If you are using PHP with a version < 5.5.0, you cannot check a functions return value directly with empty.
Note:
Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.
You have to assign it to a variable first. Further, you are missing a )
.
Try:
$slab_enabled = $displayData->sa_params->get('slab_enable');
if(empty($slab_enabled)) { /*do stuff*/ };
If you do not know, which version you use, you can check with echo phpversion();
No comments:
Post a Comment