<分区>
我有这个代码:
public function __construct($Directory = null)
{
if ($Directory === null) {
trigger_error("Directory Must Be Set!", E_USER_ERROR);
}
if (isset($Directory)) {
if (!empty(trim($Directory))) { //Error Line
echo "test";
}
}
}
( echo 是为了我的调试目的。)
我收到 fatal error :
Can't use function return value in write context
根据 PHP storm 这返回:
Variable Expected
但是直接使用这个问题的代码:
White spaces throwing off HTML form validation
这是正确的语法,因为我过去使用过它...但是,在这种情况下,这是抛出一个错误。这是为什么?