mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fix object true value: if we are in compat mode and it's Zend object -
use PHP4 rules. Otherwise, object is always true.
This commit is contained in:
parent
39ac9579f7
commit
f9c65203d2
1 changed files with 6 additions and 2 deletions
|
@ -93,8 +93,12 @@ static inline int i_zend_is_true(zval *op)
|
|||
result = (zend_hash_num_elements(op->value.ht)?1:0);
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
/* OBJ-TBI */
|
||||
result = 1;
|
||||
if(EG(ze1_compatibility_mode) && IS_ZEND_STD_OBJECT(z)) {
|
||||
TSRMLS_FETCH();
|
||||
result = (zend_hash_num_elements(Z_OBJPROP_PP(struc))?1:0);
|
||||
} else {
|
||||
result = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
result = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue