[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2006-03-22 Thread changelog
changelog   Thu Mar 23 06:31:46 2006 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewcvs.cgi/php-src/ChangeLog?r1=1.2292r2=1.2293diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2292 php-src/ChangeLog:1.2293
--- php-src/ChangeLog:1.2292Wed Mar 22 06:31:42 2006
+++ php-src/ChangeLog   Thu Mar 23 06:31:45 2006
@@ -1,3 +1,67 @@
+2006-03-22  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/standard/array.c:
+  MF51: prevent segfault when exception is thrown from Countable::count()
+
+* (PHP_5_1)
+  ext/standard/array.c:
+  prevent segfault when exception is thrown from Countable::count()
+
+* (PHP_5_1)
+  NEWS:
+  fix #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault)
+  fix similar issue in offsetExists()
+  remove redundant semicolons
+
+* ext/exif/tests/exif006.phpt:
+  no magic_quotes anymore
+
+* ZendEngine2/zend_compile.c:
+  don't segfault on 64bit platforms
+
+* (PHP_5_1)
+  ext/standard/tests/math/bug21523.phpt:
+  MFH: use set_time_limit(), this test takes forever on AIX
+
+* ext/standard/tests/math/bug21523.phpt:
+  use set_time_limit(), this test takes forever on AIX
+
+2006-03-22  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/pgsql/pgsql.c:
+  Simplify and optimize code.
+
+2006-03-22  Derick Rethans  [EMAIL PROTECTED]
+
+* ext/standard/basic_functions.c
+  ext/standard/php_string.h
+  ext/standard/string.c:
+  - Moved strtotitle to ext/standard and implemented the fallback case to
+non-unicode with ucwords. There is also an implementation for unicode
+  ucwords
+but that returns different results then strtotitle as it uppercases the
+first character of every word, and doesn't *titlecase* a word. The test
+  case
+shows that.
+
+2006-03-22  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/oci8/oci8.c:
+  MF51: fix #36820 (Privileged connection with an Oracle password file 
fails)
+
+* (PHP_5_1)
+  NEWS
+  ext/oci8/oci8.c:
+  fix #36820 (Privileged connection with an Oracle password file fails)
+
+2006-03-22  Stefan Esser  [EMAIL PROTECTED]
+
+* README.UPDATING_TO_PHP6:
+  Fix the bullshit register_globals emulation
+  
+  1) S is not _SESSION but _SERVER
+  2) EXTR_OVERWRITE is evil
+
 2006-03-21  Sara Golemon  [EMAIL PROTECTED]
 
 * main/streams/streams.c:


[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2006-03-22 Thread changelog
changelog   Thu Mar 23 06:31:57 2006 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewcvs.cgi/ZendEngine2/ChangeLog?r1=1.883r2=1.884diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.883 ZendEngine2/ChangeLog:1.884
--- ZendEngine2/ChangeLog:1.883 Tue Mar 21 06:31:49 2006
+++ ZendEngine2/ChangeLog   Thu Mar 23 06:31:57 2006
@@ -1,3 +1,8 @@
+2006-03-22  Antony Dovgal  [EMAIL PROTECTED]
+
+* zend_compile.c:
+  don't segfault on 64bit platforms
+
 2006-03-20  Dmitry Stogov  [EMAIL PROTECTED]
 
 * zend_compile.c
@@ -12797,7 +12802,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.883 2006/03/21 06:31:49 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.884 2006/03/23 06:31:57 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -14521,7 +14526,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.883 2006/03/21 06:31:49 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.884 2006/03/23 06:31:57 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-22 Thread Stefan Esser
sesser  Wed Mar 22 08:21:01 2006 UTC

  Modified files:  
/php-srcREADME.UPDATING_TO_PHP6 
  Log:
  Fix the bullshit register_globals emulation
  
  1) S is not _SESSION but _SERVER
  2) EXTR_OVERWRITE is evil
  
  
  
http://cvs.php.net/viewcvs.cgi/php-src/README.UPDATING_TO_PHP6?r1=1.1r2=1.2diff_format=u
Index: php-src/README.UPDATING_TO_PHP6
diff -u php-src/README.UPDATING_TO_PHP6:1.1 php-src/README.UPDATING_TO_PHP6:1.2
--- php-src/README.UPDATING_TO_PHP6:1.1 Tue Mar 14 16:28:35 2006
+++ php-src/README.UPDATING_TO_PHP6 Wed Mar 22 08:21:01 2006
@@ -34,30 +34,29 @@
 Here is an example to emulate the session related functions and
 a snippet to register variables:
 
-$_register_globals_order = ini_get(variables_order);
+$_register_globals_order = strrev(ini_get(variables_order));
 $_register_globals_order_len = strlen($_register_globals_order);
 
 
for($_register_globals_i=0;$_register_globals_i$_register_globals_order_len;$_register_globals_i++)
 {
switch($_register_globals_order{$_register_globals_i}) {
case E:
-   extract($_ENV, EXTR_REFS|EXTR_OVERWRITE);
+   extract($_ENV, EXTR_REFS|EXTR_SKIP);
+   break;
+
case G:
-   continue;
+   extract($_GET, EXTR_REFS|EXTR_SKIP);
break;
 
case P:
-   extract($_POST, EXTR_REFS|EXTR_OVERWRITE);
+   extract($_POST, EXTR_REFS|EXTR_SKIP);
break;
 
case C:
-   extract($_COOKIE, EXTR_REFS|EXTR_OVERWRITE);
+   extract($_COOKIE, EXTR_REFS|EXTR_SKIP);
break;
 
case S:
-   if(!isset($_SESSION)) {
-   continue;
-   }
-   extract($_SESSION, EXTR_REFS|EXTR_OVERWRITE);
+   extract($_SERVER, EXTR_REFS|EXTR_SKIP);
break;
}
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_4_4) /ext/mbstring mbstring.c

2006-03-22 Thread Seiji Masugata
Hi, Derick.

very sorry...
Was not looking at mail, because I was a long vacation.

 This is an awfully large change for a stable branch. Could you please 
 provide a more eleborate comment in those cases?

This change is not the change which is as large as that Derick thinks. :)
However, the comment I wrote  was not appropriate.

Log:
fixed doesn't return value when omitting arguments and 
return the more detailed information in mb_get_info( ).


The mb_get_info function only returns information setting in mbstring. 
The function to change is not provided.


Therefore, it is thought that there is no influence even if a lot of 
information is returned. 



The explanation became long but in this change, when it is possible 
to commit, I'm happy. :)


thank you.


On Tue, 21 Mar 2006 09:36:38 +0100 (CET)
Derick Rethans [EMAIL PROTECTED] wrote:

 On Sat, 18 Mar 2006, Seiji Masugata wrote:
 
  masugataSat Mar 18 05:52:33 2006 UTC
  
Modified files:  (Branch: PHP_4_4)
  /php-src/ext/mbstring   mbstring.c 
Log:
fixed doesn't return value when omitting arguments in mb_get_info( ).
 
 This is an awfully large change for a stable branch. Could you please 
 provide a more eleborate comment in those cases?
 

  http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.142.2.47.2.12r2=1.142.2.47.2.13diff_format=u
  Index: php-src/ext/mbstring/mbstring.c
  diff -u php-src/ext/mbstring/mbstring.c:1.142.2.47.2.12 
  php-src/ext/mbstring/mbstring.c:1.142.2.47.2.13
  --- php-src/ext/mbstring/mbstring.c:1.142.2.47.2.12 Sun Mar 12 07:54:56 2006
  +++ php-src/ext/mbstring/mbstring.c Sat Mar 18 05:52:33 2006
  @@ -17,7 +17,7 @@
  +--+
*/
   
  -/* $Id: mbstring.c,v 1.142.2.47.2.12 2006/03/12 07:54:56 hirokawa Exp $ */
  +/* $Id: mbstring.c,v 1.142.2.47.2.13 2006/03/18 05:52:33 masugata Exp $ */
   
   /*
* PHP4 Multibyte String module mbstring
  @@ -3711,22 +3711,19 @@
  Returns the current settings of mbstring */
   PHP_FUNCTION(mb_get_info)
   {
  -   zval **type;
  +   char *typ = NULL;
  +   int typ_len;
  char *name;
  -   int argc = ZEND_NUM_ARGS();
  const struct mb_overload_def *over_func;
  zval *row;
  +   const mbfl_language *lang = mbfl_no2language(MBSTRG(current_language));
   
  -   if (argc  0 || argc  1 || zend_get_parameters_ex(1, type) == 
  FAILURE) {
  -   WRONG_PARAM_COUNT;
  +   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, typ, 
  typ_len) == FAILURE) {
  +   RETURN_FALSE;
  }
   
  -   convert_to_string_ex(type);
  -
  -   if (argc == 0 || !strcasecmp(all, Z_STRVAL_PP(type))) {
  -   if (array_init(return_value) == FAILURE) {
  -   RETURN_FALSE;
  -   }
  +   if (!typ || !strcasecmp(all, typ)) {
  +   array_init(return_value);
  if ((name = (char 
  *)mbfl_no_encoding2name(MBSTRG(current_internal_encoding))) != NULL) {
  add_assoc_string(return_value, internal_encoding, 
  name, 1);
  }
  @@ -3750,19 +3747,30 @@
  } else {
  add_assoc_string(return_value, func_overload, no 
  overload, 1);
  }
  -   } else if (!strcasecmp(internal_encoding, Z_STRVAL_PP(type))) {
  +   if (lang != NULL) {
  +   if ((name = (char 
  *)mbfl_no_encoding2name(lang-mail_charset)) != NULL) {
  +   add_assoc_string(return_value, mail_charset, 
  name, 1);
  +   }
  +   if ((name = (char 
  *)mbfl_no_encoding2name(lang-mail_header_encoding)) != NULL) {
  +   add_assoc_string(return_value, 
  mail_header_encoding, name, 1);
  +   }
  +   if ((name = (char 
  *)mbfl_no_encoding2name(lang-mail_body_encoding)) != NULL) {
  +   add_assoc_string(return_value, 
  mail_body_encoding, name, 1);
  +   }
  +   }
  +   } else if (!strcasecmp(internal_encoding, typ)) {
  if ((name = (char 
  *)mbfl_no_encoding2name(MBSTRG(current_internal_encoding))) != NULL) {
  RETVAL_STRING(name, 1);
  }   
  -   } else if (!strcasecmp(http_input, Z_STRVAL_PP(type))) {
  +   } else if (!strcasecmp(http_input, typ)) {
  if ((name = (char 
  *)mbfl_no_encoding2name(MBSTRG(http_input_identify))) != NULL) {
  RETVAL_STRING(name, 1);
  }   
  -   } else if (!strcasecmp(http_output, Z_STRVAL_PP(type))) {
  +   } else if (!strcasecmp(http_output, typ)) {
  if ((name = (char 
  *)mbfl_no_encoding2name(MBSTRG(current_http_output_encoding))) != NULL) {
  RETVAL_STRING(name, 1);
  }   
  -   } else if (!strcasecmp(func_overload, Z_STRVAL_PP(type))) {
  +   } else if (!strcasecmp(func_overload, typ)) {
   

[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/oci8 oci8.c

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 09:45:39 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/oci8   oci8.c 
/php-srcNEWS 
  Log:
  fix #36820 (Privileged connection with an Oracle password file fails)
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.11r2=1.269.2.12diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.269.2.11 php-src/ext/oci8/oci8.c:1.269.2.12
--- php-src/ext/oci8/oci8.c:1.269.2.11  Tue Mar  7 07:47:43 2006
+++ php-src/ext/oci8/oci8.c Wed Mar 22 09:45:39 2006
@@ -26,7 +26,7 @@
+--+
 */
 
-/* $Id: oci8.c,v 1.269.2.11 2006/03/07 07:47:43 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.269.2.12 2006/03/22 09:45:39 tony2001 Exp $ */
 /* TODO
  *
  * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() 
with OCI_ATTR_LOBEMPTY
@@ -645,7 +645,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.269.2.11 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.269.2.12 $);
 
sprintf(buf, %ld, OCI_G(num_persistent));
php_info_print_table_row(2, Active Persistent Connections, buf);
@@ -1286,7 +1286,11 @@
case OCI_SYSDBA:
case OCI_SYSOPER:
default:
-   OCI_G(errcode) = PHP_OCI_CALL(OCISessionBegin, 
(connection-svc, OCI_G(err), connection-session, (ub4) OCI_CRED_EXT, (ub4) 
session_mode));
+   if (username_len == 1  username[0] == '/'  
password_len == 0) {
+   OCI_G(errcode) = 
PHP_OCI_CALL(OCISessionBegin, (connection-svc, OCI_G(err), 
connection-session, (ub4) OCI_CRED_EXT, (ub4) session_mode));
+   } else {
+   OCI_G(errcode) = 
PHP_OCI_CALL(OCISessionBegin, (connection-svc, OCI_G(err), 
connection-session, (ub4) OCI_CRED_RDBMS, (ub4) session_mode));
+   }
break;
}
 
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.476r2=1.2027.2.477diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.476 php-src/NEWS:1.2027.2.477
--- php-src/NEWS:1.2027.2.476   Tue Mar 21 15:35:28 2006
+++ php-src/NEWSWed Mar 22 09:45:39 2006
@@ -10,6 +10,8 @@
   (also fixes bug #36764). (Tony)
 - Removed the E_STRICT deprecation notice from var. (Ilia)
 - Fixed debug_zval_dump() to support private and protected members. (Dmitry)
+- Fixed bug #36820 (Privileged connection with an Oracle password file fails). 
+  (Tony)
 - Fixed bug #36809 (__FILE__ behavior changed). (Dmitry)
 - Fixed bug #36808 (syslog ident becomes garbage between requests). (Tony)
 - Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection).

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/oci8 oci8.c

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 09:46:13 2006 UTC

  Modified files:  
/php-src/ext/oci8   oci8.c 
  Log:
  MF51: fix #36820 (Privileged connection with an Oracle password file fails)
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8.c?r1=1.293r2=1.294diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.293 php-src/ext/oci8/oci8.c:1.294
--- php-src/ext/oci8/oci8.c:1.293   Tue Mar  7 07:45:59 2006
+++ php-src/ext/oci8/oci8.c Wed Mar 22 09:46:13 2006
@@ -26,7 +26,7 @@
+--+
 */
 
-/* $Id: oci8.c,v 1.293 2006/03/07 07:45:59 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.294 2006/03/22 09:46:13 tony2001 Exp $ */
 /* TODO
  *
  * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() 
with OCI_ATTR_LOBEMPTY
@@ -645,7 +645,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.293 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.294 $);
 
sprintf(buf, %ld, OCI_G(num_persistent));
php_info_print_table_row(2, Active Persistent Connections, buf);
@@ -1286,7 +1286,11 @@
case OCI_SYSDBA:
case OCI_SYSOPER:
default:
-   OCI_G(errcode) = PHP_OCI_CALL(OCISessionBegin, 
(connection-svc, OCI_G(err), connection-session, (ub4) OCI_CRED_EXT, (ub4) 
session_mode));
+   if (username_len == 1  username[0] == '/'  
password_len == 0) {
+   OCI_G(errcode) = 
PHP_OCI_CALL(OCISessionBegin, (connection-svc, OCI_G(err), 
connection-session, (ub4) OCI_CRED_EXT, (ub4) session_mode));
+   } else {
+   OCI_G(errcode) = 
PHP_OCI_CALL(OCISessionBegin, (connection-svc, OCI_G(err), 
connection-session, (ub4) OCI_CRED_RDBMS, (ub4) session_mode));
+   }
break;
}
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli_nonapi.c

2006-03-22 Thread Georg Richter
Am Di, den 21.03.2006 schrieb Ilia Alshanetsky um 16:35:

Hello Ilia,

  
 - if (mysql_set_character_set(mysql-mysql, cs_name)) {
 + if (!mysql-mysql-thread_id || mysql_set_character_set(mysql-mysql, 
 cs_name)) {

This fixes the problem only for this function - not in general. I'm
already working on a better fix. I will reopen the bug.

Please note, that checking thread_id will not work for embedded server.

/Georg
-- 
Georg Richter, Senior Software Developer
MySQL AB, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c php_string.h string.c /ext/unicode locale.c php_unicode.h unicode.c

2006-03-22 Thread Derick Rethans
derick  Wed Mar 22 10:20:20 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c php_string.h string.c 
/php-src/ext/unicodelocale.c php_unicode.h unicode.c 
  Log:
  - Moved strtotitle to ext/standard and implemented the fallback case to
non-unicode with ucwords. There is also an implementation for unicode 
ucwords
but that returns different results then strtotitle as it uppercases the
first character of every word, and doesn't *titlecase* a word. The test case
shows that.
  
  http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.765r2=1.766diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.765 
php-src/ext/standard/basic_functions.c:1.766
--- php-src/ext/standard/basic_functions.c:1.765Mon Mar 20 23:33:07 2006
+++ php-src/ext/standard/basic_functions.c  Wed Mar 22 10:20:20 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.765 2006/03/20 23:33:07 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.766 2006/03/22 10:20:20 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -214,6 +214,7 @@
PHP_FE(strtok,  
NULL)
PHP_FE(strtoupper,  
NULL)
PHP_FE(strtolower,  
NULL)
+   PHP_FE(strtotitle,  
NULL)
PHP_FE(strpos,  
NULL)
PHP_FE(stripos, 
NULL)
PHP_FE(strrpos, 
NULL)
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_string.h?r1=1.96r2=1.97diff_format=u
Index: php-src/ext/standard/php_string.h
diff -u php-src/ext/standard/php_string.h:1.96 
php-src/ext/standard/php_string.h:1.97
--- php-src/ext/standard/php_string.h:1.96  Thu Mar  2 13:12:45 2006
+++ php-src/ext/standard/php_string.h   Wed Mar 22 10:20:20 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_string.h,v 1.96 2006/03/02 13:12:45 dmitry Exp $ */
+/* $Id: php_string.h,v 1.97 2006/03/22 10:20:20 derick Exp $ */
 
 /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
 
@@ -41,6 +41,7 @@
 PHP_FUNCTION(strtok);
 PHP_FUNCTION(strtoupper);
 PHP_FUNCTION(strtolower);
+PHP_FUNCTION(strtotitle);
 PHP_FUNCTION(basename);
 PHP_FUNCTION(dirname);
 PHP_FUNCTION(pathinfo);
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.532r2=1.533diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.532 php-src/ext/standard/string.c:1.533
--- php-src/ext/standard/string.c:1.532 Fri Mar 17 23:14:55 2006
+++ php-src/ext/standard/string.c   Wed Mar 22 10:20:20 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.532 2006/03/17 23:14:55 helly Exp $ */
+/* $Id: string.c,v 1.533 2006/03/22 10:20:20 derick Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -54,6 +54,7 @@
 #endif
 
 #include unicode/uchar.h
+#include unicode/ubrk.h
 
 #define STR_PAD_LEFT   0
 #define STR_PAD_RIGHT  1
@@ -104,6 +105,7 @@
 /* }}} */
 
 int php_tag_find(char *tag, int len, char *set);
+static void php_ucwords(zval *str);
 
 /* this is read-only, so it's ok */
 static char hexconvtab[] = 0123456789abcdef;
@@ -1609,6 +1611,79 @@
 }
 /* }}} */
 
+/* {{{ php_strtotitle
+ */
+PHPAPI char *php_strtotitle(char *s, size_t len)
+{
+   s[0] = toupper(s[0]);
+   return s;
+}
+/* }}} */
+
+/* {{{ php_u_strtotitle
+ */
+PHPAPI UChar* php_u_strtotitle(UChar **s, int32_t *len, const char* locale)
+{
+   UChar *dest = NULL;
+   int32_t dest_len;
+   UErrorCode status = U_ZERO_ERROR;
+   UBreakIterator *brkiter;
+   
+   dest_len = *len;
+   brkiter = ubrk_open(UBRK_WORD, locale, *s, *len, status);
+   while (1) {
+   status = U_ZERO_ERROR;
+   dest = eurealloc(dest, dest_len+1);
+   dest_len = u_strToTitle(dest, dest_len, *s, *len, NULL, locale, 
status);
+   if (status != U_BUFFER_OVERFLOW_ERROR) {
+   break;
+   }
+   }
+   ubrk_close(brkiter);
+
+   if 

RE: [PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-22 Thread Ford, Mike
On 22 March 2006 08:21, Stefan Esser wrote:

 sesserWed Mar 22 08:21:01 2006 UTC
 
   Modified files:
 /php-src  README.UPDATING_TO_PHP6

   switch($_register_globals_order{$_register_globals_i}) {

Since it seems {} for character access is going to be deprecated in favour of 
[], shouldn't you set a good example by using brackets here rather than braces?

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-22 Thread Pierre
On 3/22/06, Stefan Esser [EMAIL PROTECTED] wrote:
 sesser  Wed Mar 22 08:21:01 2006 UTC

   Modified files:
 /php-srcREADME.UPDATING_TO_PHP6
   Log:
   Fix the bullshit register_globals emulation

What is bullshit? the emulation, the way it is done or both? Anyway,
you were quiet during the discussions, or did not read them, please
keep such comments for another place.

--Pierre

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-22 Thread Stefan Esser

 What is bullshit? the emulation, the way it is done or both? Anyway,
 you were quiet during the discussions, or did not read them, please
 keep such comments for another place.
   
Bullshit is an emulation that is even more insecure than
register_globals=on in the first place and that doesn't even work,
because the author obviously had no clue. S is not _SESSION, but
_SERVER. And infact the emulation did not handle _GET variables at all.

Stefan Esser

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-22 Thread Derick Rethans
On Wed, 22 Mar 2006, Stefan Esser wrote:

  What is bullshit? the emulation, the way it is done or both? Anyway,
  you were quiet during the discussions, or did not read them, please
  keep such comments for another place.

 Bullshit is an emulation that is even more insecure than
 register_globals=on in the first place and that doesn't even work,
 because the author obviously had no clue. S is not _SESSION, but
 _SERVER. And infact the emulation did not handle _GET variables at all.

I would actually be for not providing such an emulation as it's most 
likely that people just copy and paste it and we're back to square 1.

Derick

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-22 Thread Pierre
On 3/22/06, Stefan Esser [EMAIL PROTECTED] wrote:

  What is bullshit? the emulation, the way it is done or both? Anyway,
  you were quiet during the discussions, or did not read them, please
  keep such comments for another place.
 
 Bullshit is an emulation that is even more insecure than
 register_globals=on in the first place and that doesn't even work,
 because the author obviously had no clue. S is not _SESSION, but
 _SERVER. And infact the emulation did not handle _GET variables at all.

Stefan, as usual you are arguing without actually reading the relevant
discussions. The author of this little snippet provided it as example
and explicitelly said that it needs improvements, enhancements or
tests (and I repeat this call in the commit log message). Fixing it is
good, commenting it as you do is not.

--Pierre

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-22 Thread Ilia Alshanetsky

Derick Rethans wrote:
I would actually be for not providing such an emulation as it's most 
likely that people just copy and paste it and we're back to square 1.


I agree, providing emulations for inherently insecure features defeats 
the whole purpose IMO.


Ilia

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli_nonapi.c

2006-03-22 Thread Ilia Alshanetsky
I tried a few other functions like get_warnings() and they don't seem to 
mind a missing connection. So, I am not certain a generic solution is 
required here.


ilia

Georg Richter wrote:

Am Di, den 21.03.2006 schrieb Ilia Alshanetsky um 16:35:

Hello Ilia,

 
-	if (mysql_set_character_set(mysql-mysql, cs_name)) {

+   if (!mysql-mysql-thread_id || mysql_set_character_set(mysql-mysql, 
cs_name)) {


This fixes the problem only for this function - not in general. I'm
already working on a better fix. I will reopen the bug.

Please note, that checking thread_id will not work for embedded server.

/Georg


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli_nonapi.c

2006-03-22 Thread Georg Richter
Am Mi, den 22.03.2006 schrieb Ilia Alshanetsky um 18:10:

Hello Ilia,

 I tried a few other functions like get_warnings() and they don't seem to 
 mind a missing connection. So, I am not certain a generic solution is 
 required here.

All functions which need to send something to server will crash.
We will extend mysql-status (adding a new enum value
MYSQL_STATUS_INITIALIZED in MySQL 5.1 - for older versions I will
implement this in PHP).

I will commit fix tomorrow.

/Georg
-- 
Georg Richter, Senior Software Developer
MySQL AB, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c

2006-03-22 Thread Ilia Alshanetsky
iliaa   Wed Mar 22 17:32:21 2006 UTC

  Modified files:  
/php-src/ext/pgsql  pgsql.c 
  Log:
  Simplify and optimize code.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pgsql/pgsql.c?r1=1.345r2=1.346diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.345 php-src/ext/pgsql/pgsql.c:1.346
--- php-src/ext/pgsql/pgsql.c:1.345 Thu Mar 16 14:58:56 2006
+++ php-src/ext/pgsql/pgsql.c   Wed Mar 22 17:32:21 2006
@@ -20,7 +20,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.345 2006/03/16 14:58:56 edink Exp $ */
+/* $Id: pgsql.c,v 1.346 2006/03/22 17:32:21 iliaa Exp $ */
 
 #include stdlib.h
 
@@ -2672,16 +2672,15 @@
   (Jouni)
*/
 
-   if (strchr(mode_string, 'r') == mode_string) {
+   if (mode_string[0] == 'r') {
pgsql_mode |= INV_READ;
-   if (strchr(mode_string, '+') == mode_string+1) {
+   if (mode_string[1] == '+') {
pgsql_mode |= INV_WRITE;
}
-   }
-   if (strchr(mode_string, 'w') == mode_string) {
+   } else if (mode_string[0] == 'w') {
pgsql_mode |= INV_WRITE;
create = 1;
-   if (strchr(mode_string, '+') == mode_string+1) {
+   if (mode_string[1] == '+') {
pgsql_mode |= INV_READ;
}
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard/tests/math bug21523.phpt

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 19:27:28 2006 UTC

  Modified files:  
/php-src/ext/standard/tests/mathbug21523.phpt 
  Log:
  use set_time_limit(), this test takes forever on AIX
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/math/bug21523.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/math/bug21523.phpt
diff -u php-src/ext/standard/tests/math/bug21523.phpt:1.3 
php-src/ext/standard/tests/math/bug21523.phpt:1.4
--- php-src/ext/standard/tests/math/bug21523.phpt:1.3   Tue Jan 17 12:18:53 2006
+++ php-src/ext/standard/tests/math/bug21523.phpt   Wed Mar 22 19:27:28 2006
@@ -1,7 +1,8 @@
 --TEST--
 Bug #21523 (number_format tries to allocate negative amount of memory)
 --FILE--
-?php // $Id: bug21523.phpt,v 1.3 2006/01/17 12:18:53 dmitry Exp $ 
vim600:syn=php
+?php // $Id: bug21523.phpt,v 1.4 2006/03/22 19:27:28 tony2001 Exp $ 
vim600:syn=php
+set_time_limit(5);
 
 var_dump(number_format(-2000, 2768));
 echo OK;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/standard/tests/math bug21523.phpt

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 19:27:47 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard/tests/mathbug21523.phpt 
  Log:
  MFH: use set_time_limit(), this test takes forever on AIX
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/math/bug21523.phpt?r1=1.2r2=1.2.4.1diff_format=u
Index: php-src/ext/standard/tests/math/bug21523.phpt
diff -u php-src/ext/standard/tests/math/bug21523.phpt:1.2 
php-src/ext/standard/tests/math/bug21523.phpt:1.2.4.1
--- php-src/ext/standard/tests/math/bug21523.phpt:1.2   Thu Jan 23 19:07:25 2003
+++ php-src/ext/standard/tests/math/bug21523.phpt   Wed Mar 22 19:27:47 2006
@@ -1,7 +1,8 @@
 --TEST--
 Bug #21523 (number_format tries to allocate negative amount of memory)
 --FILE--
-?php // $Id: bug21523.phpt,v 1.2 2003/01/23 19:07:25 moriyoshi Exp $ 
vim600:syn=php
+?php // $Id: bug21523.phpt,v 1.2.4.1 2006/03/22 19:27:47 tony2001 Exp $ 
vim600:syn=php
+set_time_limit(5);
 
 var_dump(number_format(-2000, 2768));
 echo OK;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/exif/tests exif006.phpt

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 19:41:42 2006 UTC

  Modified files:  
/php-src/ext/exif/tests exif006.phpt 
  Log:
  no magic_quotes anymore
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/exif/tests/exif006.phpt?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/exif/tests/exif006.phpt
diff -u php-src/ext/exif/tests/exif006.phpt:1.6 
php-src/ext/exif/tests/exif006.phpt:1.7
--- php-src/ext/exif/tests/exif006.phpt:1.6 Wed Mar  8 00:43:27 2006
+++ php-src/ext/exif/tests/exif006.phpt Wed Mar 22 19:41:42 2006
@@ -7,7 +7,6 @@
 --INI--
 output_handler=
 zlib.output_compression=0
-magic_quotes_runtime=1
 --FILE--
 ?php
 /*

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / README.UPDATING_TO_PHP6

2006-03-22 Thread Pierre
On 3/22/06, Ilia Alshanetsky [EMAIL PROTECTED] wrote:
 Derick Rethans wrote:
  I would actually be for not providing such an emulation as it's most
  likely that people just copy and paste it and we're back to square 1.

 I agree, providing emulations for inherently insecure features defeats
 the whole purpose IMO.

I agree too, that's why I was not in favour to even document a way to
emulate RG. Please bring this topic back to internals, Andi requested
this doc and there was no objection.

--Pierre

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/spl spl_array.c

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 21:56:40 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/splspl_array.c 
/php-srcNEWS 
  Log:
  fix #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault)
  fix similar issue in offsetExists()
  remove redundant semicolons
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.10r2=1.71.2.11diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.10 
php-src/ext/spl/spl_array.c:1.71.2.11
--- php-src/ext/spl/spl_array.c:1.71.2.10   Sun Mar  5 17:39:49 2006
+++ php-src/ext/spl/spl_array.c Wed Mar 22 21:56:39 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.71.2.10 2006/03/05 17:39:49 helly Exp $ */
+/* $Id: spl_array.c,v 1.71.2.11 2006/03/22 21:56:39 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -262,7 +262,11 @@
zend_call_method_with_1_params(object, 
Z_OBJCE_P(object), intern-fptr_offset_get, offsetGet, rv, offset); 
zval_ptr_dtor(intern-retval);
MAKE_STD_ZVAL(intern-retval);
-   ZVAL_ZVAL(intern-retval, rv, 1, 1);
+   if (rv) {
+   ZVAL_ZVAL(intern-retval, rv, 1, 1);
+   } else {
+   ZVAL_NULL(intern-retval);
+   }
return intern-retval;
}
}
@@ -390,11 +394,13 @@
 
if (check_inherited  intern-fptr_offset_has) {
zend_call_method_with_1_params(object, Z_OBJCE_P(object), 
intern-fptr_offset_has, offsetExists, rv, offset);
-   if (zend_is_true(rv)) {
+   if (rv  zend_is_true(rv)) {
zval_ptr_dtor(rv);
return 1;
}
-   zval_ptr_dtor(rv);
+   if (rv) {
+   zval_ptr_dtor(rv);
+   }
return 0;
}

@@ -1207,43 +1213,43 @@
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array___construct, 0)
ZEND_ARG_INFO(0, array)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_offsetGet, 0, 0, 1)
ZEND_ARG_INFO(0, index)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_offsetSet, 0, 0, 2)
ZEND_ARG_INFO(0, index)
ZEND_ARG_INFO(0, newval)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_append, 0)
ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_seek, 0)
ZEND_ARG_INFO(0, position)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_exchangeArray, 0)
ZEND_ARG_INFO(0, array)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_setFlags, 0)
ZEND_ARG_INFO(0, flags)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_setIteratorClass, 0)
ZEND_ARG_INFO(0, iteratorClass)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static zend_function_entry spl_funcs_ArrayObject[] = {
SPL_ME(Array, __construct,   arginfo_array___construct, ZEND_ACC_PUBLIC)
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.477r2=1.2027.2.478diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.477 php-src/NEWS:1.2027.2.478
--- php-src/NEWS:1.2027.2.477   Wed Mar 22 09:45:39 2006
+++ php-src/NEWSWed Mar 22 21:56:40 2006
@@ -10,6 +10,8 @@
   (also fixes bug #36764). (Tony)
 - Removed the E_STRICT deprecation notice from var. (Ilia)
 - Fixed debug_zval_dump() to support private and protected members. (Dmitry)
+- Fixed bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause 
+  segfault). (Tony)
 - Fixed bug #36820 (Privileged connection with an Oracle password file fails). 
   (Tony)
 - Fixed bug #36809 (__FILE__ behavior changed). (Dmitry)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/spl spl_array.c

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 21:57:10 2006 UTC

  Modified files:  
/php-src/ext/splspl_array.c 
  Log:
  MFH: fix #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault)
  fix similar issue in offsetExists()
  remove redundant semicolons
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.100r2=1.101diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.100 php-src/ext/spl/spl_array.c:1.101
--- php-src/ext/spl/spl_array.c:1.100   Sat Mar  4 16:45:45 2006
+++ php-src/ext/spl/spl_array.c Wed Mar 22 21:57:10 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.100 2006/03/04 16:45:45 helly Exp $ */
+/* $Id: spl_array.c,v 1.101 2006/03/22 21:57:10 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -291,7 +291,11 @@
zend_call_method_with_1_params(object, 
Z_OBJCE_P(object), intern-fptr_offset_get, offsetGet, rv, offset); 
zval_ptr_dtor(intern-retval);
MAKE_STD_ZVAL(intern-retval);
-   ZVAL_ZVAL(intern-retval, rv, 1, 1);
+   if (rv) {
+   ZVAL_ZVAL(intern-retval, rv, 1, 1);
+   } else {
+   ZVAL_NULL(intern-retval);
+   }
return intern-retval;
}
}
@@ -422,11 +426,13 @@
 
if (check_inherited  intern-fptr_offset_has) {
zend_call_method_with_1_params(object, Z_OBJCE_P(object), 
intern-fptr_offset_has, offsetExists, rv, offset);
-   if (zend_is_true(rv)) {
+   if (rv  zend_is_true(rv)) {
zval_ptr_dtor(rv);
return 1;
}
-   zval_ptr_dtor(rv);
+   if (rv) {
+   zval_ptr_dtor(rv);
+   }
return 0;
}

@@ -1337,43 +1343,43 @@
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array___construct, 0)
ZEND_ARG_INFO(0, array)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_offsetGet, 0, 0, 1)
ZEND_ARG_INFO(0, index)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_array_offsetSet, 0, 0, 2)
ZEND_ARG_INFO(0, index)
ZEND_ARG_INFO(0, newval)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_append, 0)
ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_seek, 0)
ZEND_ARG_INFO(0, position)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_exchangeArray, 0)
ZEND_ARG_INFO(0, array)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_setFlags, 0)
ZEND_ARG_INFO(0, flags)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_setIteratorClass, 0)
ZEND_ARG_INFO(0, iteratorClass)
-ZEND_END_ARG_INFO();
+ZEND_END_ARG_INFO()
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_array_uXsort, 0)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/standard array.c

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 22:05:52 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard   array.c 
  Log:
  prevent segfault when exception is thrown from Countable::count()
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.308.2.19r2=1.308.2.20diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.19 
php-src/ext/standard/array.c:1.308.2.20
--- php-src/ext/standard/array.c:1.308.2.19 Sun Mar 19 22:11:36 2006
+++ php-src/ext/standard/array.cWed Mar 22 22:05:51 2006
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.19 2006/03/19 22:11:36 tony2001 Exp $ */
+/* $Id: array.c,v 1.308.2.20 2006/03/22 22:05:51 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -312,8 +312,10 @@
 
if (Z_OBJ_HT_P(array)-get_class_entry  
instanceof_function(Z_OBJCE_P(array), spl_ce_Countable TSRMLS_CC)) {
zend_call_method_with_0_params(array, NULL, 
NULL, count, retval);
-   RETVAL_LONG(Z_LVAL_P(retval));
-   zval_ptr_dtor(retval);
+   if (retval) {
+   RETVAL_LONG(Z_LVAL_P(retval));
+   zval_ptr_dtor(retval);
+   }
return;
}
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard array.c

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 22:06:08 2006 UTC

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  MF51: prevent segfault when exception is thrown from Countable::count()
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.345r2=1.346diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.345 php-src/ext/standard/array.c:1.346
--- php-src/ext/standard/array.c:1.345  Sun Mar 19 22:12:39 2006
+++ php-src/ext/standard/array.cWed Mar 22 22:06:08 2006
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.345 2006/03/19 22:12:39 tony2001 Exp $ */
+/* $Id: array.c,v 1.346 2006/03/22 22:06:08 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -318,8 +318,10 @@
 
if (Z_OBJ_HT_P(array)-get_class_entry  
instanceof_function(Z_OBJCE_P(array), spl_ce_Countable TSRMLS_CC)) {
zend_call_method_with_0_params(array, NULL, 
NULL, count, retval);
-   RETVAL_LONG(Z_LVAL_P(retval));
-   zval_ptr_dtor(retval);
+   if (retval) {
+   RETVAL_LONG(Z_LVAL_P(retval));
+   zval_ptr_dtor(retval);
+   }
return;
}
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl/tests bug36825.phpt

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 23:10:59 2006 UTC

  Added files: (Branch: PHP_5_1)
/php-src/ext/spl/tests  bug36825.phpt 
  Log:
  add test
  
  

http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/tests/bug36825.phpt?view=markuprev=1.1
Index: php-src/ext/spl/tests/bug36825.phpt
+++ php-src/ext/spl/tests/bug36825.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl spl_array.c

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 23:12:03 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/splspl_array.c 
  Log:
  fix leak
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.11r2=1.71.2.12diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.11 
php-src/ext/spl/spl_array.c:1.71.2.12
--- php-src/ext/spl/spl_array.c:1.71.2.11   Wed Mar 22 21:56:39 2006
+++ php-src/ext/spl/spl_array.c Wed Mar 22 23:12:03 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.71.2.11 2006/03/22 21:56:39 tony2001 Exp $ */
+/* $Id: spl_array.c,v 1.71.2.12 2006/03/22 23:12:03 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -260,14 +260,13 @@
if (intern-fptr_offset_get) {
zval *rv;
zend_call_method_with_1_params(object, 
Z_OBJCE_P(object), intern-fptr_offset_get, offsetGet, rv, offset); 
-   zval_ptr_dtor(intern-retval);
-   MAKE_STD_ZVAL(intern-retval);
if (rv) {
+   zval_ptr_dtor(intern-retval);
+   MAKE_STD_ZVAL(intern-retval);
ZVAL_ZVAL(intern-retval, rv, 1, 1);
-   } else {
-   ZVAL_NULL(intern-retval);
+   return intern-retval;
}
-   return intern-retval;
+   return EG(uninitialized_zval_ptr);
}
}
return *spl_array_get_dimension_ptr_ptr(check_inherited, object, 
offset, type TSRMLS_CC);


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/spl spl_array.c /ext/spl/tests bug36825.phpt

2006-03-22 Thread Antony Dovgal
tony2001Wed Mar 22 23:12:38 2006 UTC

  Modified files:  
/php-src/ext/splspl_array.c 
/php-src/ext/spl/tests  bug36825.phpt 
  Log:
  fix leak, add test
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.101r2=1.102diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.101 php-src/ext/spl/spl_array.c:1.102
--- php-src/ext/spl/spl_array.c:1.101   Wed Mar 22 21:57:10 2006
+++ php-src/ext/spl/spl_array.c Wed Mar 22 23:12:38 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.101 2006/03/22 21:57:10 tony2001 Exp $ */
+/* $Id: spl_array.c,v 1.102 2006/03/22 23:12:38 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -289,14 +289,13 @@
if (intern-fptr_offset_get) {
zval *rv;
zend_call_method_with_1_params(object, 
Z_OBJCE_P(object), intern-fptr_offset_get, offsetGet, rv, offset); 
-   zval_ptr_dtor(intern-retval);
-   MAKE_STD_ZVAL(intern-retval);
if (rv) {
+   zval_ptr_dtor(intern-retval);
+   MAKE_STD_ZVAL(intern-retval);
ZVAL_ZVAL(intern-retval, rv, 1, 1);
-   } else {
-   ZVAL_NULL(intern-retval);
+   return intern-retval;
}
-   return intern-retval;
+   return EG(uninitialized_zval_ptr);
}
}
return *spl_array_get_dimension_ptr_ptr(check_inherited, object, 
offset, type TSRMLS_CC);
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/tests/bug36825.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/spl/tests/bug36825.phpt
diff -u /dev/null php-src/ext/spl/tests/bug36825.phpt:1.2
--- /dev/null   Wed Mar 22 23:12:38 2006
+++ php-src/ext/spl/tests/bug36825.phpt Wed Mar 22 23:12:38 2006
@@ -0,0 +1,26 @@
+--TEST--
+Bug #36825 ()
+--FILE--
+?php
+
+class foo extends ArrayObject {
+   public function __construct() {
+   }
+
+   public function offsetGet($key) {
+   throw new Exception(hi);
+   }
+}
+
+$test=new foo();
+try{
+   var_dump($test['bar']);
+} catch (Exception $e) {
+   echo got exception\n;
+}
+
+echo Done\n;
+?
+--EXPECT-- 
+got exception
+Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2006-03-22 Thread Rasmus Lerdorf
rasmus  Wed Mar 22 23:30:49 2006 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  pecl/apc karma for Brian Shire
  
  
http://cvs.php.net/viewcvs.cgi/CVSROOT/avail?r1=1.1110r2=1.diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1110 CVSROOT/avail:1.
--- CVSROOT/avail:1.1110Sun Mar 19 22:44:12 2006
+++ CVSROOT/avail   Wed Mar 22 23:30:49 2006
@@ -150,7 +150,7 @@
 # pieces of other CVS modules.
 
 avail|sterling,derick,imajes,phanto,sebastian,helly,jan|pecl/adt
-avail|beckerr,val|pecl/apc
+avail|beckerr,val,shire|pecl/apc
 avail|atex|pecl/rpmreader
 avail|wez,sterling,edink,derick,tal,bs|embed,embed-web
 avail|hholzgra,stas,derick|functable

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c php_string.h string.c /ext/unicode locale.c php_unicode.h unicode.c

2006-03-22 Thread Andrei Zmievski

Derick,

What do you think titlecase means in non-Unicode world?

-Andrei


On Mar 22, 2006, at 2:20 AM, Derick Rethans wrote:


derick  Wed Mar 22 10:20:20 2006 UTC

  Modified files:
/php-src/ext/standard   basic_functions.c php_string.h string.c
/php-src/ext/unicodelocale.c php_unicode.h unicode.c
  Log:
  - Moved strtotitle to ext/standard and implemented the fallback  
case to
non-unicode with ucwords. There is also an implementation for  
unicode ucwords
but that returns different results then strtotitle as it  
uppercases the
first character of every word, and doesn't *titlecase* a word.  
The test case

shows that.

derick-20060322102020.txt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo_mysql mysql_driver.c

2006-03-22 Thread Pierre-Alain Joye
pajoye  Thu Mar 23 01:24:36 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/pdo_mysql  mysql_driver.c 
  Log:
  - Fixed fetching of string value bigger than 128bytes when no options
are used
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.59.2.11r2=1.59.2.12diff_format=u
Index: php-src/ext/pdo_mysql/mysql_driver.c
diff -u php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.11 
php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.12
--- php-src/ext/pdo_mysql/mysql_driver.c:1.59.2.11  Fri Mar 17 00:15:09 2006
+++ php-src/ext/pdo_mysql/mysql_driver.cThu Mar 23 01:24:36 2006
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: mysql_driver.c,v 1.59.2.11 2006/03/17 00:15:09 iliaa Exp $ */
+/* $Id: mysql_driver.c,v 1.59.2.12 2006/03/23 01:24:36 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -440,6 +440,7 @@
}

dbh-driver_data = H;
+   H-max_buffer_size = 1024*1024;
 
/* handle MySQL options */
if (driver_options) {
@@ -449,7 +450,7 @@
 
H-buffered = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 0 TSRMLS_CC);
H-emulate_prepare = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_DIRECT_QUERY, 0 TSRMLS_CC);
-   H-max_buffer_size = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024 TSRMLS_CC);
+   H-max_buffer_size = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, H-max_buffer_size TSRMLS_CC);
 
if (mysql_options(H-server, MYSQL_OPT_CONNECT_TIMEOUT, (const 
char *)connect_timeout)) {
pdo_mysql_error(dbh);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pdo_mysql mysql_driver.c

2006-03-22 Thread Pierre-Alain Joye
pajoye  Thu Mar 23 01:37:38 2006 UTC

  Modified files:  
/php-src/ext/pdo_mysql  mysql_driver.c 
  Log:
  . MFB: Fixed fetching of string value bigger than 128bytes when no options
are used
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_mysql/mysql_driver.c?r1=1.72r2=1.73diff_format=u
Index: php-src/ext/pdo_mysql/mysql_driver.c
diff -u php-src/ext/pdo_mysql/mysql_driver.c:1.72 
php-src/ext/pdo_mysql/mysql_driver.c:1.73
--- php-src/ext/pdo_mysql/mysql_driver.c:1.72   Fri Mar 17 00:15:28 2006
+++ php-src/ext/pdo_mysql/mysql_driver.cThu Mar 23 01:37:38 2006
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: mysql_driver.c,v 1.72 2006/03/17 00:15:28 iliaa Exp $ */
+/* $Id: mysql_driver.c,v 1.73 2006/03/23 01:37:38 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -431,6 +431,7 @@
}

dbh-driver_data = H;
+   H-max_buffer_size = 1024 * 1024;
 
/* handle MySQL options */
if (driver_options) {
@@ -440,7 +441,7 @@
 
H-buffered = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 0 TSRMLS_CC);
H-emulate_prepare = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_DIRECT_QUERY, 0 TSRMLS_CC);
-   H-max_buffer_size = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, 1024 * 1024 TSRMLS_CC);
+   H-max_buffer_size = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_MAX_BUFFER_SIZE, H-max_buffer_size TSRMLS_CC);
 
if (mysql_options(H-server, MYSQL_OPT_CONNECT_TIMEOUT, (const 
char *)connect_timeout)) {
pdo_mysql_error(dbh);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/mbstring mbstring.c mbstring.h /ext/mbstring/libmbfl/mbfl mbfilter.c

2006-03-22 Thread Seiji Masugata
masugataThu Mar 23 02:17:43 2006 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/mbstring   mbstring.c mbstring.h 
/php-src/ext/mbstring/libmbfl/mbfl  mbfilter.c 
  Log:
  revert.(See http://news.php.net/php.cvs/37387)
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.142.2.47.2.15r2=1.142.2.47.2.16diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.142.2.47.2.15 
php-src/ext/mbstring/mbstring.c:1.142.2.47.2.16
--- php-src/ext/mbstring/mbstring.c:1.142.2.47.2.15 Tue Mar 21 08:00:55 2006
+++ php-src/ext/mbstring/mbstring.c Thu Mar 23 02:17:42 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.142.2.47.2.15 2006/03/21 08:00:55 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.142.2.47.2.16 2006/03/23 02:17:42 masugata Exp $ */
 
 /*
  * PHP4 Multibyte String module mbstring
@@ -253,7 +253,6 @@
PHP_FE(mb_decode_numericentity, NULL)
PHP_FE(mb_send_mail,NULL)
PHP_FE(mb_get_info, NULL)
-   PHP_FE(mb_check_encoding,   NULL)
PHP_FALIAS(mbstrlen,mb_strlen,  NULL)
PHP_FALIAS(mbstrpos,mb_strpos,  NULL)
PHP_FALIAS(mbstrrpos,   mb_strrpos, NULL)
@@ -3813,67 +3812,6 @@
 }
 /* }}} */
 
-/* {{{ proto bool mb_check_encoding([string var[, string encoding]])
-   Check if the string is valid for the specified encoding */
-PHP_FUNCTION(mb_check_encoding)
-{
-   char *var = NULL;
-   int var_len;
-   char *enc = NULL;
-   int enc_len;
-   char *name;
-   mbfl_buffer_converter *convd;
-   enum mbfl_no_encoding no_encoding = MBSTRG(current_internal_encoding);
-   zval *row;
-   mbfl_string string, result, *ret = NULL;
-   long illegalchars = 0;
-
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |ss, var, 
var_len, enc, enc_len) == FAILURE) {
-   RETURN_FALSE;
-   }
-
-   if (var == NULL) {
-   RETURN_BOOL(MBSTRG(illegalchars) == 0);
-   }
-
-   if (enc != NULL) {
-   no_encoding = mbfl_name2no_encoding(enc);
-   if (no_encoding == mbfl_no_encoding_invalid || no_encoding == 
mbfl_no_encoding_pass) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid 
encoding \%s\, enc);
-   RETURN_FALSE;
-   }
-   }
-   
-   convd = mbfl_buffer_converter_new(no_encoding, no_encoding, 0);
-   if (convd == NULL) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to create 
converter);
-   RETURN_FALSE;
-   }   
-   mbfl_buffer_converter_illegal_mode(convd, 
MBSTRG(current_filter_illegal_mode));
-   mbfl_buffer_converter_illegal_substchar(convd, 
MBSTRG(current_filter_illegal_substchar));   
-   
-   /* initialize string */
-   mbfl_string_init(string);
-   mbfl_string_init(result);
-   string.no_encoding = no_encoding;
-   string.no_language = MBSTRG(current_language);
-
-   string.val = (unsigned char *)var;
-   string.len = var_len;
-   ret = mbfl_buffer_converter_feed_result(convd, string, result);
-   illegalchars = mbfl_buffer_illegalchars(convd);
-   mbfl_buffer_converter_delete(convd);
-
-   if (ret != NULL) {
-   MBSTRG(illegalchars) += illegalchars;
-   efree(ret-val);
-   RETURN_BOOL(illegalchars == 0);
-   } else {
-   RETURN_FALSE;
-   }
-}
-/* }}} */
-
 /* {{{ MBSTRING_API int php_mb_encoding_translation() */
 MBSTRING_API int php_mb_encoding_translation(TSRMLS_D) 
 {
http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.h?r1=1.40.2.12.4.3r2=1.40.2.12.4.4diff_format=u
Index: php-src/ext/mbstring/mbstring.h
diff -u php-src/ext/mbstring/mbstring.h:1.40.2.12.4.3 
php-src/ext/mbstring/mbstring.h:1.40.2.12.4.4
--- php-src/ext/mbstring/mbstring.h:1.40.2.12.4.3   Tue Mar 21 08:00:55 2006
+++ php-src/ext/mbstring/mbstring.h Thu Mar 23 02:17:42 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: mbstring.h,v 1.40.2.12.4.3 2006/03/21 08:00:55 hirokawa Exp $ */
+/* $Id: mbstring.h,v 1.40.2.12.4.4 2006/03/23 02:17:42 masugata Exp $ */
 
 /*
  * PHP4 Multibyte String module mbstring (currently only for Japanese)
@@ -117,7 +117,6 @@
 PHP_FUNCTION(mb_decode_numericentity);
 PHP_FUNCTION(mb_send_mail);
 PHP_FUNCTION(mb_get_info);
-PHP_FUNCTION(mb_check_encoding);
 
 MBSTRING_API int php_mb_encoding_translation(TSRMLS_D);
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c?r1=1.1.2.7.2.4r2=1.1.2.7.2.5diff_format=u
Index: php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c
diff -u php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.1.2.7.2.4