add_property_string(return_value, "table",(msql_field->table?msql_field->table:""), 1);
You can see that it's being duplicated anyway.
Code which really requires an emalloc'ed empty string should use STR_EMPTY_ALLOC()
Important to note especially for maintainers who will hopefully check that I didn't break anything.
Andi
From: "Andi Gutmans" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Mon, 19 Jul 2004 07:19:52 -0000
X-Security: message sanitized on mail.zend.com
See http://www.impsec.org/email-tools/sanitizer-intro.html
for details. $Revision: 1.143 $Date: 2004-04-10 09:05:42-07
Old-Subject: [PHP-CVS] cvs: php-src /ext/gd gd.c gd_ctx.c /ext/ircg ircg.c /ext/mbstring php_mbregex.c /ext/msql php_msql.c /ext/mssql php_mssql.c /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c /ext/oci8 oci8.c /ext/odbc php_odbc.c /ext/pcre php_pcre.c /ext/pgsql pgsql.c /ext/session session.c /ext/standard file.c math.c reg.c string.c var_unserializer.c var_unserializer.re /ext/sybase php_sybase_db.c /ext/sybase_ct php_sybase_ct.c /ext/wddx wddx.c /main php_ini.c safe_mode.c /sapi/apache mod_php5.c /sapi/apache2filter php_functions.c sapi_apache2.c /sapi/apache2handler php_functions.c sapi_apache2.c /sapi/apache_hooks mod_php5.c
Subject: [PHP-CVS] cvs: php-src /ext/gd gd.c gd_ctx.c /ext/ircg ircg.c /ext/mbstring php_mbregex.c /ext/msql php_msql.c /ext/mssql php_mssql.c /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c /ext/oci8 oci8.c /ext/odbc php_odbc.c /ext/pcre ph
X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.13.6.2
andi Mon Jul 19 03:19:52 2004 EDT
Modified files: /php-src/ext/gd gd.c gd_ctx.c /php-src/ext/ircg ircg.c /php-src/ext/mbstring php_mbregex.c /php-src/ext/msql php_msql.c /php-src/ext/mssql php_mssql.c /php-src/ext/mysql php_mysql.c /php-src/ext/mysqli mysqli_api.c /php-src/ext/oci8 oci8.c /php-src/ext/odbc php_odbc.c /php-src/ext/pcre php_pcre.c /php-src/ext/pgsql pgsql.c /php-src/ext/session session.c /php-src/ext/standard file.c math.c reg.c string.c var_unserializer.c var_unserializer.re /php-src/ext/sybase php_sybase_db.c /php-src/ext/sybase_ct php_sybase_ct.c /php-src/ext/wddx wddx.c /php-src/main php_ini.c safe_mode.c /php-src/sapi/apache mod_php5.c /php-src/sapi/apache2filter php_functions.c sapi_apache2.c /php-src/sapi/apache2handler php_functions.c sapi_apache2.c /php-src/sapi/apache_hooks mod_php5.c Log: - Nuke empty_string. It is a reminanent from the time where RETURN_FALSE() used to return "" and not bool(false). It's not worth keeping it because STR_FREE() and zval_dtor() always have to check for it and it slows down the general case. In addition, it seems that empty_string has been abused quite a lot, and was used not only for setting zval's but generally in PHP code instead of "", which wasn't the intention. Last but not least, nuking empty_string should improve stability as I doubt every place correctly checked if they are not mistakenly erealloc()'ing it or calling efree() on it. NOTE: Some code is probably broken. Each extension maintainer should check and see that my changes are OK. Also, I haven't had time to touch PECL yet. Will try and do it tomorrow.
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.294&r2=1.295&ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.294 php-src/ext/gd/gd.c:1.295 --- php-src/ext/gd/gd.c:1.294 Thu May 20 19:37:59 2004 +++ php-src/ext/gd/gd.c Mon Jul 19 03:19:37 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.294 2004/05/20 23:37:59 iliaa Exp $ */ +/* $Id: gd.c,v 1.295 2004/07/19 07:19:37 andi Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1709,7 +1709,7 @@ } if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { - if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || php_check_open_basedir(fn TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); RETURN_FALSE; } @@ -3825,13 +3825,13 @@ } /* Check origin file */ - if (!fn_org || fn_org == empty_string || php_check_open_basedir(fn_org TSRMLS_CC)) { + if (!fn_org || php_check_open_basedir(fn_org TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid origin filename '%s'", fn_org); RETURN_FALSE; } /* Check destination file */ - if (!fn_dest || fn_dest == empty_string || php_check_open_basedir(fn_dest TSRMLS_CC)) { + if (!fn_dest || php_check_open_basedir(fn_dest TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid destination filename '%s'", fn_dest); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/gd/gd_ctx.c?r1=1.20&r2=1.21&ty=u Index: php-src/ext/gd/gd_ctx.c diff -u php-src/ext/gd/gd_ctx.c:1.20 php-src/ext/gd/gd_ctx.c:1.21 --- php-src/ext/gd/gd_ctx.c:1.20 Wed Jan 28 11:25:12 2004 +++ php-src/ext/gd/gd_ctx.c Mon Jul 19 03:19:38 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd_ctx.c,v 1.20 2004/01/28 16:25:12 martin Exp $ */ +/* $Id: gd_ctx.c,v 1.21 2004/07/19 07:19:38 andi Exp $ */ #include "php_gd.h" @@ -82,7 +82,7 @@ } if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { - if (!fn || fn == empty_string || php_check_open_basedir(fn TSRMLS_CC)) { + if (!fn || php_check_open_basedir(fn TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'", fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/ircg/ircg.c?r1=1.200&r2=1.201&ty=u Index: php-src/ext/ircg/ircg.c diff -u php-src/ext/ircg/ircg.c:1.200 php-src/ext/ircg/ircg.c:1.201 --- php-src/ext/ircg/ircg.c:1.200 Thu Jan 8 03:15:52 2004 +++ php-src/ext/ircg/ircg.c Mon Jul 19 03:19:38 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ircg.c,v 1.200 2004/01/08 08:15:52 andi Exp $ */ +/* $Id: ircg.c,v 1.201 2004/07/19 07:19:38 andi Exp $ */ /* {{{ includes */ @@ -2322,7 +2322,7 @@ #define ADD_PARA() do { \ if (para.len) smart_str_0(¶); \ add_next_index_stringl(return_value, \ - para.len == 0 ? empty_string : para.c, \ + para.len == 0 ? STR_EMPTY_ALLOC() : para.c, \ para.len, 0); \ para.len = 0; \ para.c = 0; \ http://cvs.php.net/diff.php/php-src/ext/mbstring/php_mbregex.c?r1=1.48&r2=1.49&ty=u Index: php-src/ext/mbstring/php_mbregex.c diff -u php-src/ext/mbstring/php_mbregex.c:1.48 php-src/ext/mbstring/php_mbregex.c:1.49 --- php-src/ext/mbstring/php_mbregex.c:1.48 Sat Feb 28 15:45:23 2004 +++ php-src/ext/mbstring/php_mbregex.c Mon Jul 19 03:19:38 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mbregex.c,v 1.48 2004/02/28 20:45:23 moriyoshi Exp $ */ +/* $Id: php_mbregex.c,v 1.49 2004/07/19 07:19:38 andi Exp $ */ #ifdef HAVE_CONFIG_H @@ -864,7 +864,7 @@ if (n > 0) { add_next_index_stringl(return_value, pos, n, 1); } else { - add_next_index_stringl(return_value, empty_string, 0, 1); + add_next_index_stringl(return_value, "", 0, 1); } } /* }}} */ http://cvs.php.net/diff.php/php-src/ext/msql/php_msql.c?r1=1.57&r2=1.58&ty=u Index: php-src/ext/msql/php_msql.c diff -u php-src/ext/msql/php_msql.c:1.57 php-src/ext/msql/php_msql.c:1.58 --- php-src/ext/msql/php_msql.c:1.57 Thu Jan 8 03:16:11 2004 +++ php-src/ext/msql/php_msql.c Mon Jul 19 03:19:38 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_msql.c,v 1.57 2004/01/08 08:16:11 andi Exp $ */ +/* $Id: php_msql.c,v 1.58 2004/07/19 07:19:38 andi Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -959,7 +959,7 @@ } } else { /* - add_get_index_stringl(return_value, i, empty_string, 0, (void **) &pval_ptr, 1); + add_get_index_stringl(return_value, i, "", 0, (void **) &pval_ptr, 1); */ } } @@ -1097,8 +1097,8 @@ } object_init(return_value); - add_property_string(return_value, "name",(msql_field->name?msql_field->name:empty_string), 1); - add_property_string(return_value, "table",(msql_field->table?msql_field->table:empty_string), 1); + add_property_string(return_value, "name",(msql_field->name?msql_field->name:""), 1); + add_property_string(return_value, "table",(msql_field->table?msql_field->table:""), 1); add_property_long(return_value, "not_null",IS_NOT_NULL(msql_field->flags)); #if MSQL1 add_property_long(return_value, "primary_key",(msql_field->flags&PRI_KEY_FLAG?1:0)); http://cvs.php.net/diff.php/php-src/ext/mssql/php_mssql.c?r1=1.137&r2=1.138&ty=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.137 php-src/ext/mssql/php_mssql.c:1.138 --- php-src/ext/mssql/php_mssql.c:1.137 Sat Jul 10 03:46:08 2004 +++ php-src/ext/mssql/php_mssql.c Mon Jul 19 03:19:39 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.137 2004/07/10 07:46:08 andi Exp $ */ +/* $Id: php_mssql.c,v 1.138 2004/07/19 07:19:39 andi Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -333,7 +333,7 @@ MS_SQL_G(default_link) = -1; MS_SQL_G(num_links) = MS_SQL_G(num_persistent); MS_SQL_G(appname) = estrndup("PHP 5", 5); - MS_SQL_G(server_message) = empty_string; + MS_SQL_G(server_message) = NULL; MS_SQL_G(min_error_severity) = MS_SQL_G(cfg_min_error_severity); MS_SQL_G(min_message_severity) = MS_SQL_G(cfg_min_message_severity); if (MS_SQL_G(connect_timeout) < 1) MS_SQL_G(connect_timeout) = 1; @@ -1045,7 +1045,7 @@ result->fields[i].column_source = estrdup(source); } else { - result->fields[i].column_source = empty_string; + result->fields[i].column_source = STR_EMPTY_ALLOC(); } column_types[i] = coltype(i+1); @@ -1267,7 +1267,7 @@ RETURN_STRING(MS_SQL_G(server_message),1); } else { - RETURN_STRING(empty_string,1); + RETURN_STRING("",1); } } http://cvs.php.net/diff.php/php-src/ext/mysql/php_mysql.c?r1=1.209&r2=1.210&ty=u Index: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.209 php-src/ext/mysql/php_mysql.c:1.210 --- php-src/ext/mysql/php_mysql.c:1.209 Fri Jun 4 11:26:54 2004 +++ php-src/ext/mysql/php_mysql.c Mon Jul 19 03:19:39 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.209 2004/06/04 15:26:54 iliaa Exp $ */ +/* $Id: php_mysql.c,v 1.210 2004/07/19 07:19:39 andi Exp $ */ /* TODO: * @@ -2245,9 +2245,9 @@ } object_init(return_value); - add_property_string(return_value, "name",(mysql_field->name?mysql_field->name:empty_string), 1); - add_property_string(return_value, "table",(mysql_field->table?mysql_field->table:empty_string), 1); - add_property_string(return_value, "def",(mysql_field->def?mysql_field->def:empty_string), 1); + add_property_string(return_value, "name",(mysql_field->name?mysql_field->name:""), 1); + add_property_string(return_value, "table",(mysql_field->table?mysql_field->table:""), 1); + add_property_string(return_value, "def",(mysql_field->def?mysql_field->def:""), 1); add_property_long(return_value, "max_length", mysql_field->max_length); add_property_long(return_value, "not_null", IS_NOT_NULL(mysql_field->flags)?1:0); add_property_long(return_value, "primary_key", IS_PRI_KEY(mysql_field->flags)?1:0); http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.88&r2=1.89&ty=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.88 php-src/ext/mysqli/mysqli_api.c:1.89 --- php-src/ext/mysqli/mysqli_api.c:1.88 Sat Jul 17 06:48:28 2004 +++ php-src/ext/mysqli/mysqli_api.c Mon Jul 19 03:19:40 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c,v 1.88 2004/07/17 10:48:28 georg Exp $ + $Id: mysqli_api.c,v 1.89 2004/07/19 07:19:40 andi Exp $ */ #ifdef HAVE_CONFIG_H @@ -906,7 +906,7 @@ } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link"); - RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : empty_string, 1); + RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "", 1); } /* }}} */ @@ -971,7 +971,7 @@ } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link"); - RETURN_STRING((mysql->mysql->info) ? mysql->mysql->info : empty_string, 1); + RETURN_STRING((mysql->mysql->info) ? mysql->mysql->info : "", 1); } /* }}} */ http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.257&r2=1.258&ty=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.257 php-src/ext/oci8/oci8.c:1.258 --- php-src/ext/oci8/oci8.c:1.257 Thu Jul 15 07:00:14 2004 +++ php-src/ext/oci8/oci8.c Mon Jul 19 03:19:40 2004 @@ -22,7 +22,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8.c,v 1.257 2004/07/15 11:00:14 tony2001 Exp $ */ +/* $Id: oci8.c,v 1.258 2004/07/19 07:19:40 andi Exp $ */ /* TODO list: * @@ -786,7 +786,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.257 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.258 $"); sprintf(buf, "%ld", num_persistent); php_info_print_table_row(2, "Active Persistent Links", buf); @@ -880,12 +880,12 @@ if (bind->indicator == -1) { /* NULL */ zval *val = bind->zval; - if (Z_TYPE_P(val) == IS_STRING && (Z_STRVAL_P(val) != empty_string)) { + if (Z_TYPE_P(val) == IS_STRING)) { *Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */ } zval_dtor(val); ZVAL_NULL(val); - } else if (Z_TYPE_P(bind->zval) == IS_STRING && (Z_STRVAL_P(bind->zval) != empty_string)) { + } else if (Z_TYPE_P(bind->zval) == IS_STRING) { Z_STRVAL_P(bind->zval) = erealloc(Z_STRVAL_P(bind->zval), Z_STRLEN_P(bind->zval)+1); Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] = '\0'; } http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.179&r2=1.180&ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.179 php-src/ext/odbc/php_odbc.c:1.180 --- php-src/ext/odbc/php_odbc.c:1.179 Thu Jul 15 11:09:12 2004 +++ php-src/ext/odbc/php_odbc.c Mon Jul 19 03:19:41 2004 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.179 2004/07/15 15:09:12 kalowsky Exp $ */ +/* $Id: php_odbc.c,v 1.180 2004/07/19 07:19:41 andi Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1421,13 +1421,13 @@ case SQL_VARBINARY: case SQL_LONGVARBINARY: if (result->binmode <= 0) { - Z_STRVAL_P(tmp) = empty_string; + Z_STRVAL_P(tmp) = STR_EMPTY_ALLOC(); break; } if (result->binmode == 1) sql_c_type = SQL_C_BINARY; case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <= 0) { - Z_STRVAL_P(tmp) = empty_string; + Z_STRVAL_P(tmp) = STR_EMPTY_ALLOC(); break; } if (buf == NULL) buf = emalloc(result->longreadlen + 1); @@ -1580,13 +1580,13 @@ case SQL_VARBINARY: case SQL_LONGVARBINARY: if (result->binmode <= 0) { - Z_STRVAL_P(tmp) = empty_string; + Z_STRVAL_P(tmp) = STR_EMPTY_ALLOC(); break; } if (result->binmode == 1) sql_c_type = SQL_C_BINARY; case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <= 0) { - Z_STRVAL_P(tmp) = empty_string; + Z_STRVAL_P(tmp) = STR_EMPTY_ALLOC(); break; } http://cvs.php.net/diff.php/php-src/ext/pcre/php_pcre.c?r1=1.157&r2=1.158&ty=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.157 php-src/ext/pcre/php_pcre.c:1.158 --- php-src/ext/pcre/php_pcre.c:1.157 Tue Jun 22 18:21:58 2004 +++ php-src/ext/pcre/php_pcre.c Mon Jul 19 03:19:42 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.157 2004/06/22 22:21:58 andrei Exp $ */ +/* $Id: php_pcre.c,v 1.158 2004/07/19 07:19:42 andi Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -511,7 +511,7 @@ */ if (count < num_subpats) { for (; i < num_subpats; i++) { - add_next_index_string(match_sets[i], empty_string, 1); + add_next_index_string(match_sets[i], "", 1); } } } else { @@ -734,7 +734,7 @@ esc_match_len = 0; } } else { - esc_match = empty_string; + esc_match = ""; esc_match_len = 0; match_len = 0; } @@ -1005,7 +1005,8 @@ /* Make sure we're dealing with strings. */ convert_to_string_ex(subject); - ZVAL_STRINGL(&empty_replace, empty_string, 0, 0); + /* FIXME: This might need to be changed to STR_EMPTY_ALLOC(). Check if this zval could be dtor()'ed somehow */ + ZVAL_STRINGL(&empty_replace, "", 0, 0); /* If regex is an array */ if (Z_TYPE_P(regex) == IS_ARRAY) { @@ -1389,7 +1390,7 @@ /* Nothing to do if we got an empty string */ if (in_str == in_str_end) { - RETVAL_STRINGL(empty_string, 0, 0); + RETVAL_STRINGL("", 0, 1); } if (ZEND_NUM_ARGS() == 2) { http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.311&r2=1.312&ty=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.311 php-src/ext/pgsql/pgsql.c:1.312 --- php-src/ext/pgsql/pgsql.c:1.311 Wed May 12 12:49:47 2004 +++ php-src/ext/pgsql/pgsql.c Mon Jul 19 03:19:42 2004 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.311 2004/05/12 16:49:47 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.312 2004/07/19 07:19:42 andi Exp $ */ #include <stdlib.h> @@ -1214,7 +1214,7 @@ PQclear(result); } smart_str_free(&str); - return empty_string; + return STR_EMPTY_ALLOC(); } num_rows = PQntuples(result); oid_offset = PQfnumber(result,"oid"); @@ -1786,7 +1786,7 @@ if (Z_STRVAL_P(return_value)) { RETURN_STRING(Z_STRVAL_P(return_value), 1); } - RETURN_STRING(empty_string, 0); + RETURN_STRING("", 1); #endif } /* }}} */ http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.391&r2=1.392&ty=u Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.391 php-src/ext/session/session.c:1.392 --- php-src/ext/session/session.c:1.391 Sat Jul 10 03:46:08 2004 +++ php-src/ext/session/session.c Mon Jul 19 03:19:43 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: session.c,v 1.391 2004/07/10 07:46:08 andi Exp $ */ +/* $Id: session.c,v 1.392 2004/07/19 07:19:43 andi Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1060,7 +1060,7 @@ smart_str_0(&var); REGISTER_STRINGL_CONSTANT("SID", var.c, var.len, 0); } else { - REGISTER_STRINGL_CONSTANT("SID", empty_string, 0, 0); + REGISTER_STRINGL_CONSTANT("SID", "", 0, 1); } if (PS(apply_trans_sid)) { @@ -1370,13 +1370,16 @@ { zval **p_name; int ac = ZEND_NUM_ARGS(); - char *old = empty_string; + char *old; if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) WRONG_PARAM_COUNT; - if (PS(id)) + if (PS(id)) { old = estrdup(PS(id)); + } else { + old = STR_EMPTY_ALLOC(); + } if (ac == 1) { convert_to_string_ex(p_name); http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.382&r2=1.383&ty=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.382 php-src/ext/standard/file.c:1.383 --- php-src/ext/standard/file.c:1.382 Wed Jun 16 19:57:25 2004 +++ php-src/ext/standard/file.c Mon Jul 19 03:19:44 2004 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.382 2004/06/16 23:57:25 abies Exp $ */ +/* $Id: file.c,v 1.383 2004/07/19 07:19:44 andi Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -416,7 +416,7 @@ if (have_content) { add_assoc_string(return_value, name, value, 0); } else { - add_assoc_string(return_value, name, empty_string, 0); + add_assoc_string(return_value, name, "", 0); } efree(name); http://cvs.php.net/diff.php/php-src/ext/standard/math.c?r1=1.115&r2=1.116&ty=u Index: php-src/ext/standard/math.c diff -u php-src/ext/standard/math.c:1.115 php-src/ext/standard/math.c:1.116 --- php-src/ext/standard/math.c:1.115 Thu Jun 10 15:38:24 2004 +++ php-src/ext/standard/math.c Mon Jul 19 03:19:44 2004 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c,v 1.115 2004/06/10 19:38:24 iliaa Exp $ */ +/* $Id: math.c,v 1.116 2004/07/19 07:19:44 andi Exp $ */ #include "php.h" #include "php_math.h" @@ -791,7 +791,7 @@ unsigned long value; if (Z_TYPE_P(arg) != IS_LONG || base < 2 || base > 36) { - return empty_string; + return STR_EMPTY_ALLOC(); } value = Z_LVAL_P(arg); @@ -820,7 +820,7 @@ static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; if ((Z_TYPE_P(arg) != IS_LONG && Z_TYPE_P(arg) != IS_DOUBLE) || base < 2 || base > 36) { - return empty_string; + return STR_EMPTY_ALLOC(); } if (Z_TYPE_P(arg) == IS_DOUBLE) { @@ -831,7 +831,7 @@ /* Don't try to convert +/- infinity */ if (fvalue == HUGE_VAL || fvalue == -HUGE_VAL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number too large"); - return empty_string; + return STR_EMPTY_ALLOC(); } end = ptr = buf + sizeof(buf) - 1; http://cvs.php.net/diff.php/php-src/ext/standard/reg.c?r1=1.78&r2=1.79&ty=u Index: php-src/ext/standard/reg.c diff -u php-src/ext/standard/reg.c:1.78 php-src/ext/standard/reg.c:1.79 --- php-src/ext/standard/reg.c:1.78 Thu Jan 8 03:17:34 2004 +++ php-src/ext/standard/reg.c Mon Jul 19 03:19:45 2004 @@ -17,7 +17,7 @@ | Jaakko Hyvätti <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.78 2004/01/08 08:17:34 andi Exp $ */ +/* $Id: reg.c,v 1.79 2004/07/19 07:19:45 andi Exp $ */ #include <stdio.h> #include <ctype.h> @@ -428,7 +428,7 @@ if (Z_STRVAL_PP(arg_pattern) && Z_STRLEN_PP(arg_pattern)) pattern = estrndup(Z_STRVAL_PP(arg_pattern), Z_STRLEN_PP(arg_pattern)); else - pattern = empty_string; + pattern = STR_EMPTY_ALLOC(); } else { convert_to_long_ex(arg_pattern); pattern = emalloc(2); @@ -440,7 +440,7 @@ if (Z_STRVAL_PP(arg_replace) && Z_STRLEN_PP(arg_replace)) replace = estrndup(Z_STRVAL_PP(arg_replace), Z_STRLEN_PP(arg_replace)); else - replace = empty_string; + replace = STR_EMPTY_ALLOC(); } else { convert_to_long_ex(arg_replace); replace = emalloc(2); @@ -452,7 +452,7 @@ if (Z_STRVAL_PP(arg_string) && Z_STRLEN_PP(arg_string)) string = estrndup(Z_STRVAL_PP(arg_string), Z_STRLEN_PP(arg_string)); else - string = empty_string; + string = STR_EMPTY_ALLOC(); /* do the actual work */ ret = php_reg_replace(pattern, replace, string, icase, 1); @@ -527,7 +527,7 @@ while ((count == -1 || count > 1) && !(err = regexec(&re, strp, 1, subs, 0))) { if (subs[0].rm_so == 0 && subs[0].rm_eo) { /* match is at start of string, return empty string */ - add_next_index_stringl(return_value, empty_string, 0, 1); + add_next_index_stringl(return_value, "", 0, 1); /* skip ahead the length of the regex match */ strp += subs[0].rm_eo; } else if (subs[0].rm_so == 0 && subs[0].rm_eo == 0) { http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.421&r2=1.422&ty=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.421 php-src/ext/standard/string.c:1.422 --- php-src/ext/standard/string.c:1.421 Sun Jul 18 07:34:28 2004 +++ php-src/ext/standard/string.c Mon Jul 19 03:19:45 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.421 2004/07/18 11:34:28 andrey Exp $ */ +/* $Id: string.c,v 1.422 2004/07/19 07:19:45 andi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3206,7 +3206,7 @@ convert_to_string_ex(subject); Z_TYPE_P(result) = IS_STRING; if (Z_STRLEN_PP(subject) == 0) { - ZVAL_STRINGL(result, empty_string, 0, 1); + ZVAL_STRINGL(result, "", 0, 1); return; } @@ -3254,7 +3254,7 @@ zend_hash_move_forward(Z_ARRVAL_P(replace)); } else { /* We've run out of replacement strings, so use an empty one. */ - replace_value = empty_string; + replace_value = ""; replace_len = 0; } } @@ -4186,11 +4186,11 @@ /* Don't waste our time if it's empty */ if (Z_STRLEN_PP(input_str) == 0) - RETURN_STRINGL(empty_string, 0, 1); + RETURN_STRINGL("", 0, 1); /* ... or if the multiplier is zero */ if (Z_LVAL_PP(mult) == 0) - RETURN_STRINGL(empty_string, 0, 1); + RETURN_STRINGL("", 0, 1); /* Initialize the result string */ result_len = Z_STRLEN_PP(input_str) * Z_LVAL_PP(mult); http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.c?r1=1.38&r2=1.39&ty=u Index: php-src/ext/standard/var_unserializer.c diff -u php-src/ext/standard/var_unserializer.c:1.38 php-src/ext/standard/var_unserializer.c:1.39 --- php-src/ext/standard/var_unserializer.c:1.38 Fri Mar 26 20:27:53 2004 +++ php-src/ext/standard/var_unserializer.c Mon Jul 19 03:19:46 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.c,v 1.38 2004/03/27 01:27:53 helly Exp $ */ +/* $Id: var_unserializer.c,v 1.39 2004/07/19 07:19:46 andi Exp $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -605,11 +605,7 @@ len = parse_iv(start + 2); - if (len == 0) { - str = empty_string; - } else { - str = estrndup(YYCURSOR, len); - } + str = estrndup(YYCURSOR, len); YYCURSOR += len + 2; *p = YYCURSOR; http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.re?r1=1.27&r2=1.28&ty=u Index: php-src/ext/standard/var_unserializer.re diff -u php-src/ext/standard/var_unserializer.re:1.27 php-src/ext/standard/var_unserializer.re:1.28 --- php-src/ext/standard/var_unserializer.re:1.27 Fri Mar 26 19:50:39 2004 +++ php-src/ext/standard/var_unserializer.re Mon Jul 19 03:19:46 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.re,v 1.27 2004/03/27 00:50:39 helly Exp $ */ +/* $Id: var_unserializer.re,v 1.28 2004/07/19 07:19:46 andi Exp $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -350,11 +350,7 @@ len = parse_iv(start + 2); - if (len == 0) { - str = empty_string; - } else { - str = estrndup(YYCURSOR, len); - } + str = estrndup(YYCURSOR, len); YYCURSOR += len + 2; *p = YYCURSOR; http://cvs.php.net/diff.php/php-src/ext/sybase/php_sybase_db.c?r1=1.62&r2=1.63&ty=u Index: php-src/ext/sybase/php_sybase_db.c diff -u php-src/ext/sybase/php_sybase_db.c:1.62 php-src/ext/sybase/php_sybase_db.c:1.63 --- php-src/ext/sybase/php_sybase_db.c:1.62 Sat Jul 10 03:46:08 2004 +++ php-src/ext/sybase/php_sybase_db.c Mon Jul 19 03:19:46 2004 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_db.c,v 1.62 2004/07/10 07:46:08 andi Exp $ */ +/* $Id: php_sybase_db.c,v 1.63 2004/07/19 07:19:46 andi Exp $ */ #ifdef HAVE_CONFIG_H @@ -282,7 +282,7 @@ php_sybase_module.default_link=-1; php_sybase_module.num_links = php_sybase_module.num_persistent; php_sybase_module.appname = estrndup("PHP " PHP_VERSION, sizeof("PHP " PHP_VERSION)); - php_sybase_module.server_message = empty_string; + php_sybase_module.server_message = STR_EMPTY_ALLOC(); php_sybase_module.min_error_severity = php_sybase_module.cfg_min_error_severity; php_sybase_module.min_message_severity = php_sybase_module.cfg_min_message_severity; return SUCCESS; @@ -886,7 +886,7 @@ result->fields[i].max_length = dbcollen(sybase_ptr->link,i+1); result->fields[i].column_source = estrdup(dbcolsource(sybase_ptr->link,i+1)); if (!result->fields[i].column_source) { - result->fields[i].column_source = empty_string; + result->fields[i].column_source = STR_EMPTY_ALLOC(); } Z_TYPE(result->fields[i]) = column_types[i]; /* set numeric flag */ http://cvs.php.net/diff.php/php-src/ext/sybase_ct/php_sybase_ct.c?r1=1.97&r2=1.98&ty=u Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.97 php-src/ext/sybase_ct/php_sybase_ct.c:1.98 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.97 Sat Jul 10 03:46:08 2004 +++ php-src/ext/sybase_ct/php_sybase_ct.c Mon Jul 19 03:19:47 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_ct.c,v 1.97 2004/07/10 07:46:08 andi Exp $ */ +/* $Id: php_sybase_ct.c,v 1.98 2004/07/19 07:19:47 andi Exp $ */ #ifdef HAVE_CONFIG_H @@ -428,7 +428,7 @@ SybCtG(default_link)=-1; SybCtG(num_links) = SybCtG(num_persistent); SybCtG(appname) = estrndup("PHP " PHP_VERSION, sizeof("PHP " PHP_VERSION)); - SybCtG(server_message) = empty_string; + SybCtG(server_message) = STR_EMPTY_ALLOC(); return SUCCESS; } @@ -1274,7 +1274,7 @@ result->fields[i].name = estrdup(computed_buf); j++; } - result->fields[i].column_source = empty_string; + result->fields[i].column_source = STR_EMPTY_ALLOC(); result->fields[i].max_length = result->datafmt[i].maxlength-1; result->fields[i].numeric = result->numerics[i]; Z_TYPE(result->fields[i]) = result->types[i]; http://cvs.php.net/diff.php/php-src/ext/wddx/wddx.c?r1=1.111&r2=1.112&ty=u Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.111 php-src/ext/wddx/wddx.c:1.112 --- php-src/ext/wddx/wddx.c:1.111 Tue Jun 29 21:12:03 2004 +++ php-src/ext/wddx/wddx.c Mon Jul 19 03:19:47 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c,v 1.111 2004/06/30 01:12:03 iliaa Exp $ */ +/* $Id: wddx.c,v 1.112 2004/07/19 07:19:47 andi Exp $ */ #include "php.h" @@ -710,7 +710,7 @@ ALLOC_ZVAL(ent.data); INIT_PZVAL(ent.data); Z_TYPE_P(ent.data) = IS_STRING; - Z_STRVAL_P(ent.data) = empty_string; + Z_STRVAL_P(ent.data) = STR_EMPTY_ALLOC(); Z_STRLEN_P(ent.data) = 0; wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry)); } else if (!strcmp(name, EL_BINARY)) { @@ -720,7 +720,7 @@ ALLOC_ZVAL(ent.data); INIT_PZVAL(ent.data); Z_TYPE_P(ent.data) = IS_STRING; - Z_STRVAL_P(ent.data) = empty_string; + Z_STRVAL_P(ent.data) = STR_EMPTY_ALLOC(); Z_STRLEN_P(ent.data) = 0; wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry)); } else if (!strcmp(name, EL_CHAR)) { http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=1.127&r2=1.128&ty=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.127 php-src/main/php_ini.c:1.128 --- php-src/main/php_ini.c:1.127 Sat Feb 14 07:35:59 2004 +++ php-src/main/php_ini.c Mon Jul 19 03:19:48 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ini.c,v 1.127 2004/02/14 12:35:59 derick Exp $ */ +/* $Id: php_ini.c,v 1.128 2004/07/19 07:19:48 andi Exp $ */ /* Check CWD for php.ini */ #define INI_CHECK_CWD @@ -170,7 +170,7 @@ */ static void pvalue_config_destructor(zval *pvalue) { - if (Z_TYPE_P(pvalue) == IS_STRING && Z_STRVAL_P(pvalue) != empty_string) { + if (Z_TYPE_P(pvalue) == IS_STRING) { free(Z_STRVAL_P(pvalue)); } } http://cvs.php.net/diff.php/php-src/main/safe_mode.c?r1=1.58&r2=1.59&ty=u Index: php-src/main/safe_mode.c diff -u php-src/main/safe_mode.c:1.58 php-src/main/safe_mode.c:1.59 --- php-src/main/safe_mode.c:1.58 Thu Jan 8 03:17:54 2004 +++ php-src/main/safe_mode.c Mon Jul 19 03:19:48 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: safe_mode.c,v 1.58 2004/01/08 08:17:54 andi Exp $ */ +/* $Id: safe_mode.c,v 1.59 2004/07/19 07:19:48 andi Exp $ */ #include "php.h" @@ -207,11 +207,11 @@ pstat = sapi_get_stat(TSRMLS_C); if (!pstat) { - return empty_string; + return ""; } if ((pwd=getpwuid(pstat->st_uid))==NULL) { - return empty_string; + return ""; } SG(request_info).current_user_length = strlen(pwd->pw_name); SG(request_info).current_user = estrndup(pwd->pw_name, SG(request_info).current_user_length); http://cvs.php.net/diff.php/php-src/sapi/apache/mod_php5.c?r1=1.10&r2=1.11&ty=u Index: php-src/sapi/apache/mod_php5.c diff -u php-src/sapi/apache/mod_php5.c:1.10 php-src/sapi/apache/mod_php5.c:1.11 --- php-src/sapi/apache/mod_php5.c:1.10 Wed Jul 14 05:43:26 2004 +++ php-src/sapi/apache/mod_php5.c Mon Jul 19 03:19:49 2004 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php5.c,v 1.10 2004/07/14 09:43:26 sesser Exp $ */ +/* $Id: mod_php5.c,v 1.11 2004/07/19 07:19:49 andi Exp $ */ #include "php_apache_http.h" #include "http_conf_globals.h" @@ -235,7 +235,7 @@ if (elts[i].val) { val = elts[i].val; } else { - val = empty_string; + val = ""; } php_register_variable(elts[i].key, val, track_vars_array TSRMLS_CC); } http://cvs.php.net/diff.php/php-src/sapi/apache2filter/php_functions.c?r1=1.41&r2=1.42&ty=u Index: php-src/sapi/apache2filter/php_functions.c diff -u php-src/sapi/apache2filter/php_functions.c:1.41 php-src/sapi/apache2filter/php_functions.c:1.42 --- php-src/sapi/apache2filter/php_functions.c:1.41 Thu Jan 8 03:18:04 2004 +++ php-src/sapi/apache2filter/php_functions.c Mon Jul 19 03:19:49 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_functions.c,v 1.41 2004/01/08 08:18:04 andi Exp $ */ +/* $Id: php_functions.c,v 1.42 2004/07/19 07:19:49 andi Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -165,7 +165,7 @@ arr = apr_table_elts(ctx->f->r->headers_in); APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = empty_string; + if (!val) val = ""; add_assoc_string(return_value, key, val, 1); APR_ARRAY_FOREACH_CLOSE() } @@ -185,7 +185,7 @@ arr = apr_table_elts(ctx->f->r->headers_out); APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = empty_string; + if (!val) val = ""; add_assoc_string(return_value, key, val, 1); APR_ARRAY_FOREACH_CLOSE() } http://cvs.php.net/diff.php/php-src/sapi/apache2filter/sapi_apache2.c?r1=1.125&r2=1.126&ty=u Index: php-src/sapi/apache2filter/sapi_apache2.c diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.125 php-src/sapi/apache2filter/sapi_apache2.c:1.126 --- php-src/sapi/apache2filter/sapi_apache2.c:1.125 Thu Jun 17 20:36:58 2004 +++ php-src/sapi/apache2filter/sapi_apache2.c Mon Jul 19 03:19:49 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.125 2004/06/18 00:36:58 iliaa Exp $ */ +/* $Id: sapi_apache2.c,v 1.126 2004/07/19 07:19:49 andi Exp $ */ #include <fcntl.h> @@ -220,7 +220,7 @@ char *key, *val; APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = empty_string; + if (!val) val = ""; php_register_variable(key, val, track_vars_array TSRMLS_CC); APR_ARRAY_FOREACH_CLOSE() http://cvs.php.net/diff.php/php-src/sapi/apache2handler/php_functions.c?r1=1.13&r2=1.14&ty=u Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.13 php-src/sapi/apache2handler/php_functions.c:1.14 --- php-src/sapi/apache2handler/php_functions.c:1.13 Thu Jan 8 03:18:05 2004 +++ php-src/sapi/apache2handler/php_functions.c Mon Jul 19 03:19:50 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_functions.c,v 1.13 2004/01/08 08:18:05 andi Exp $ */ +/* $Id: php_functions.c,v 1.14 2004/07/19 07:19:50 andi Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -183,7 +183,7 @@ arr = apr_table_elts(ctx->r->headers_in); APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = empty_string; + if (!val) val = ""; add_assoc_string(return_value, key, val, 1); APR_ARRAY_FOREACH_CLOSE() } @@ -203,7 +203,7 @@ arr = apr_table_elts(ctx->r->headers_out); APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = empty_string; + if (!val) val = ""; add_assoc_string(return_value, key, val, 1); APR_ARRAY_FOREACH_CLOSE() } @@ -423,7 +423,7 @@ php_info_print_table_header(2, "Variable", "Value"); APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { - val = empty_string; + val = ""; } php_info_print_table_row(2, key, val); APR_ARRAY_FOREACH_CLOSE() @@ -438,7 +438,7 @@ arr = apr_table_elts(((php_struct *) SG(server_context))->r->headers_in); APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { - val = empty_string; + val = ""; } php_info_print_table_row(2, key, val); APR_ARRAY_FOREACH_CLOSE() @@ -447,7 +447,7 @@ arr = apr_table_elts(((php_struct *) SG(server_context))->r->headers_out); APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { - val = empty_string; + val = ""; } php_info_print_table_row(2, key, val); APR_ARRAY_FOREACH_CLOSE() http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.41&r2=1.42&ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.41 php-src/sapi/apache2handler/sapi_apache2.c:1.42 --- php-src/sapi/apache2handler/sapi_apache2.c:1.41 Sat Jul 17 17:29:50 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Mon Jul 19 03:19:50 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.41 2004/07/17 21:29:50 moriyoshi Exp $ */ +/* $Id: sapi_apache2.c,v 1.42 2004/07/19 07:19:50 andi Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -215,7 +215,7 @@ char *key, *val; APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = empty_string; + if (!val) val = ""; php_register_variable(key, val, track_vars_array TSRMLS_CC); APR_ARRAY_FOREACH_CLOSE() http://cvs.php.net/diff.php/php-src/sapi/apache_hooks/mod_php5.c?r1=1.4&r2=1.5&ty=u Index: php-src/sapi/apache_hooks/mod_php5.c diff -u php-src/sapi/apache_hooks/mod_php5.c:1.4 php-src/sapi/apache_hooks/mod_php5.c:1.5 --- php-src/sapi/apache_hooks/mod_php5.c:1.4 Wed Jul 14 05:55:24 2004 +++ php-src/sapi/apache_hooks/mod_php5.c Mon Jul 19 03:19:50 2004 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php5.c,v 1.4 2004/07/14 09:55:24 sesser Exp $ */ +/* $Id: mod_php5.c,v 1.5 2004/07/19 07:19:50 andi Exp $ */ #include "php_apache_http.h" @@ -382,7 +382,7 @@ if (elts[i].val) { val = elts[i].val; } else { - val = empty_string; + val = ""; } php_register_variable(elts[i].key, val, track_vars_array TSRMLS_CC); }
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php