1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00

Fix spl_directory cast_object, reenable error

This commit is contained in:
Nikita Popov
2014-05-12 20:44:30 +02:00
parent f29b68306d
commit 8904f72d7c
2 changed files with 4 additions and 2 deletions
+1 -2
View File
@@ -115,8 +115,7 @@ again:
break;
}
// TODO: The following line breakes phar ???
// zend_error(E_RECOVERABLE_ERROR, "Object of class %s could not be converted to boolean", Z_OBJ_P(op)->ce->name->val);
zend_error(E_RECOVERABLE_ERROR, "Object of class %s could not be converted to boolean", Z_OBJ_P(op)->ce->name->val);
} else if (Z_OBJ_HT_P(op)->get) {
zval rv;
zval *tmp = Z_OBJ_HT_P(op)->get(op, &rv TSRMLS_CC);
+3
View File
@@ -1881,6 +1881,9 @@ static int spl_filesystem_object_cast(zval *readobj, zval *writeobj, int type TS
}
return SUCCESS;
}
} else if (type == _IS_BOOL) {
ZVAL_TRUE(writeobj);
return SUCCESS;
}
if (readobj == writeobj) {
zval_dtor(readobj);