Re: PHP 4.0 Bug #4586: if (!empty($class_a->get('aa'))) { produces parse error
| From: | Zeev Suraski | Date: | Wed, 24 May 2000 21:41:39 +0000 |
| Subject: | Re: PHP 4.0 Bug #4586: if (!empty($class_a->get('aa'))) { produces parse error | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-19410@lists.php.net to get a copy of this message | ||
Since empty(expr) is equivalent to (isset(expr) && (expr)!=0), and since isset() only works on variables, you cannot use empty() on anything other than a variable (and $class_a->get('aa') is not a variable).
Zeev
At 21:02 24/05/2000 , wints@hot.ee wrote:
-- Zeev Suraski <zeev@zend.com> http://www.zend.com/From: wints@hot.eeOperating system: redhat 6.0PHP version: 4.0 Release Candidate 2 PHP Bug Type: Scripting Engine problem Bug description: if (!empty($class_a->get('aa'))) { produces parse errorthis script produces error: parse error ,expecting ´')" in ... on line ... if (!empty($t_dtd->get('group_field'))) {$group_field = 'v'.$t_dtd->get('group_field'); if (!empty($t_dtd->get('group_func'))){ $group_func = "g_fn_".$t_dtd->get('group_func'); }else{ $group_func = "g_fn_base"; }} this one is ok $t = $t_dtd->get('group_field'); if (!empty($t)) {$group_field = 'v'.$t_dtd->get('group_field'); $t = $t_dtd->get('group_func'); if (!empty($t)){ $group_func = "g_fn_".$t_dtd->get('group_func'); }else{ $group_func = "g_fn_base"; }} -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net