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:
+1
-2
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user