【发布时间】:2022-10-09 06:04:06
【问题描述】:
我正在使用 PHP Phan 扫描一些代码并在升级前确保 PHP 7 兼容性。它报告了以下问题...
if(!empty($values->custom_field['section'][0]['value'])):
Expected an object instance when accessing an instance property, but saw an expression $values with type null
我不确定是什么导致了错误。我该如何解决?
【问题讨论】:
-
你是如何初始化 $values 的?你在哪里做的?
标签: php