diff options
author | ULF WENDEL <uw@php.net> | 2012-10-22 13:37:37 +0200 |
---|---|---|
committer | ULF WENDEL <uw@php.net> | 2012-10-22 13:37:37 +0200 |
commit | dfeb91acc7d44cc5035db34a31310dc3075df11f (patch) | |
tree | e6e1b6c6898fc10eb602a9f5317371180d208b5b /ext/spl/spl_fixedarray.c | |
parent | 645f84e41bbda22c7a19326cd1a7df7994678976 (diff) | |
parent | dbb72de6c75796803ed6ed103763a12eebc9e78e (diff) | |
download | php-git-dfeb91acc7d44cc5035db34a31310dc3075df11f.tar.gz |
Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3
* 'PHP-5.3' of git.php.net:php-src: (123 commits)
Re-fixed bug #60901 (Improve "tail" syntax for AIX installation)
updated NEWS
Fixed bug #63284 PCRE upgrade to 8.31
preg indenpent test script for #63055
Update libmagic.patch
Add fix & missing fix
Fixed bug #63307 (Unused variable in oci8.c)
Fixed bug #63265 (Add ORA-00028 to the PHP_OCI_HANDLE_ERROR macro)
- Updated to version 2012.7 (2012g)
SUpport newer bisons.
Merge the fix for #61964 to 5.3, which will fix #63304
indent
better fix for #63055
Fixed bug #63055 (Segfault in zend_gc with SF2 testsuite)
PHP 5.3.18 NEWS
fix NEWS
fix compilation failure on 32/64bit linux systems, when libmysql is used with ext/mysql
Remove executable permission on inc
Remove executable permission on phpt
Fixed bug #63236 (Executable permission on various source files)
...
Diffstat (limited to 'ext/spl/spl_fixedarray.c')
-rw-r--r-- | ext/spl/spl_fixedarray.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index ee8f51eb33..0aac6d3f30 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -223,10 +223,14 @@ static zend_object_value spl_fixedarray_object_new_ex(zend_class_entry *class_ty if (orig && clone_orig) { spl_fixedarray_object *other = (spl_fixedarray_object*)zend_object_store_get_object(orig TSRMLS_CC); intern->ce_get_iterator = other->ce_get_iterator; - - intern->array = emalloc(sizeof(spl_fixedarray)); - spl_fixedarray_init(intern->array, other->array->size TSRMLS_CC); - spl_fixedarray_copy(intern->array, other->array TSRMLS_CC); + if (!other->array) { + /* leave a empty object, will be dtor later by CLONE handler */ + zend_throw_exception(spl_ce_RuntimeException, "The instance wasn't initialized properly", 0 TSRMLS_CC); + } else { + intern->array = emalloc(sizeof(spl_fixedarray)); + spl_fixedarray_init(intern->array, other->array->size TSRMLS_CC); + spl_fixedarray_copy(intern->array, other->array TSRMLS_CC); + } } while (parent) { |