pollita Sat Oct 7 16:40:39 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/gd gd.c Log: MFH(r-1.356) Don't assume the array elements are arrays too http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.6&r2=1.312.2.20.2.7&diff_format=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.312.2.20.2.6 php-src/ext/gd/gd.c:1.312.2.20.2.7 --- php-src/ext/gd/gd.c:1.312.2.20.2.6 Thu Sep 28 23:17:31 2006 +++ php-src/ext/gd/gd.c Sat Oct 7 16:40:39 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.312.2.20.2.6 2006/09/28 23:17:31 iliaa Exp $ */ +/* $Id: gd.c,v 1.312.2.20.2.7 2006/10/07 16:40:39 pollita Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -5092,7 +5092,7 @@ } for (i=0; i<3; i++) { - if (zend_hash_index_find(Z_ARRVAL_P(hash_matrix), (i), (void **) &var) == SUCCESS) { + if (zend_hash_index_find(Z_ARRVAL_P(hash_matrix), (i), (void **) &var) == SUCCESS && Z_TYPE_PP(var) == IS_ARRAY) { if (Z_TYPE_PP(var) != IS_ARRAY || zend_hash_num_elements(Z_ARRVAL_PP(var)) != 3 ) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must have 3x3 array"); RETURN_FALSE;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php