I have this code:
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";
}
}
}
(The echo is for my debugging purposes.)
I get returned with the fatal error:
Can't use function return value in write context
According to PHP storm this returns:
Variable Expected
But using the code directly from this question:
White spaces throwing off HTML form validation
This is the correct syntax, as i've used it in the past... But, in this situation this is throwing an error. Why is this?