com gtk/php-gtk: Kill warning.: ext/gtk+/gtk.overrides
[email protected] (David Soria Parra)
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 82ed5a50b6927984013003f43f858faa476ba8fb Author: Andrei Zmievski <[email protected]> Sun, 25 Jun 2006 18:28:10 +0000 Parents: 6fc9ed83f2ed7c8d53f268db6a35439b02883868 Branches: master Link: http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=82ed5a50b6927984013003f43f858faa476ba8fb Log: Kill warning. Changed paths: M ext/gtk+/gtk.overrides Diff: 82ed5a50b6927984013003f43f858faa476ba8fb diff --git a/ext/gtk+/gtk.overrides b/ext/gtk+/gtk.overrides index a72c660..723fab0 100644 --- a/ext/gtk+/gtk.overrides +++ b/ext/gtk+/gtk.overrides @@ -1772,6 +1772,7 @@ PHP_METHOD GdkBitmap *mask_closed = NULL, *mask_opened = NULL; GtkCTree *tree; gchar **text = NULL; + int array_size; NOT_STATIC_METHOD(); @@ -1788,8 +1789,9 @@ PHP_METHOD tree = GTK_CTREE(PHPG_GOBJECT(this_ptr)); columns = GTK_CLIST(tree)->columns; - if (zend_hash_num_elements(Z_ARRVAL_P(php_text)) != columns) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "the text array size (%d) does not match the number of columns in the ctree (%d)", get_active_function_name(TSRMLS_C), zend_hash_num_elements(Z_ARRVAL_P(php_text)), columns); + array_size = zend_hash_num_elements(Z_ARRVAL_P(php_text)); + if (array_size != columns) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "the text array size (%d) does not match the number of columns in the ctree (%d)", array_size, columns); return; }