iliaa           Mon Nov  6 17:21:06 2006 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/standard/tests/strings bug39350.phpt 

  Modified files:              
    /php-src    NEWS 
    /php-src/ext/standard       string.c 
  Log:
  Fixed bug #39350 (crash with implode("\n", array(false))).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.333&r2=1.2027.2.547.2.334&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.333 php-src/NEWS:1.2027.2.547.2.334
--- php-src/NEWS:1.2027.2.547.2.333     Mon Nov  6 16:36:42 2006
+++ php-src/NEWS        Mon Nov  6 17:21:05 2006
@@ -16,6 +16,7 @@
 - Fixed bug #39366 (imagerotate does not use alpha with angle > 45°) (Pierre)
 - Fixed bug #39362 (Added an option to imap_open/imap_reopen to control the 
   number of connection retries). (Ilia)
+- Fixed bug #39350 (crash with implode("\n", array(false))). (Ilia)
 - Fixed bug #39273 (imagecopyresized may ignore alpha channel) (Pierre)
 - Fixed bug #39364 (Removed warning on empty haystack inside mb_strstr()).
   (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.27&r2=1.445.2.14.2.28&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.27 
php-src/ext/standard/string.c:1.445.2.14.2.28
--- php-src/ext/standard/string.c:1.445.2.14.2.27       Wed Oct 11 14:19:55 2006
+++ php-src/ext/standard/string.c       Mon Nov  6 17:21:05 2006
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.27 2006/10/11 14:19:55 iliaa Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.28 2006/11/06 17:21:05 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -955,7 +955,12 @@
        }
        smart_str_0(&implstr);
 
-       RETURN_STRINGL(implstr.c, implstr.len, 0);
+       if (implstr.len) {
+               RETURN_STRINGL(implstr.c, implstr.len, 0);
+       } else {
+               smart_str_free(&implstr);
+               RETURN_EMPTY_STRING();
+       }
 }
 /* }}} */
 

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/bug39350.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/strings/bug39350.phpt
+++ php-src/ext/standard/tests/strings/bug39350.phpt

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

Reply via email to