mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
More informative errors here and these are real core errors
This commit is contained in:
parent
7bbe6080f2
commit
c9c1fcc026
@ -166,12 +166,12 @@ ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC)
|
||||
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
|
||||
|
||||
if (!EG(objects_store).object_buckets[handle].valid) {
|
||||
zend_error(E_ERROR, "Trying to clone invalid object");
|
||||
zend_error(E_CORE_ERROR, "Trying to clone invalid object of class %s", Z_OBJCE_P(zobject)->name);
|
||||
}
|
||||
obj = &EG(objects_store).object_buckets[handle].bucket.obj;
|
||||
|
||||
if (obj->clone == NULL) {
|
||||
zend_error(E_ERROR, "Trying to clone uncloneable object");
|
||||
zend_error(E_CORE_ERROR, "Trying to clone uncloneable object of class %s", Z_OBJCE_P(zobject)->name);
|
||||
}
|
||||
|
||||
obj->clone(obj->object, &new_object TSRMLS_CC);
|
||||
|
Loading…
Reference in New Issue
Block a user