felipe                                   Thu, 24 Jun 2010 23:10:39 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=300741

Log:
- Fixed bug #52163 (SplFileObject::fgetss() fails due to parameter that can't 
be set) [already fixed on other branches]

Bug: http://bugs.php.net/52163 (Open) SplFileObject::fgetss() fails due to 
parameter that can't be set
      
Changed paths:
    U   php/php-src/branches/PHP_5_2/NEWS
    U   php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_2/NEWS   2010-06-24 22:53:14 UTC (rev 300740)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-06-24 23:10:39 UTC (rev 300741)
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Jun 2010, PHP 5.2.14
+- Fixed bug #52163 (SplFileObject::fgetss() fails due to parameter that can't
+  be set). (Felipe)
 - Fixed bug #52162 (custom request header variables with numbers are removed).
   (Sriram Natarajan)
 - Fixed bug #52061 (memory_limit above 2G). (Felipe)

Modified: php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c        2010-06-24 
22:53:14 UTC (rev 300740)
+++ php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c        2010-06-24 
23:10:39 UTC (rev 300741)
@@ -2118,8 +2118,13 @@
        spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
        zval *arg2 = NULL;
        MAKE_STD_ZVAL(arg2);
-       ZVAL_LONG(arg2, intern->u.file.max_line_len);

+       if (intern->u.file.max_line_len > 0) {
+               ZVAL_LONG(arg2, intern->u.file.max_line_len);
+       } else {
+               ZVAL_LONG(arg2, 1024);
+       }
+
        spl_filesystem_file_free_line(intern TSRMLS_CC);
        intern->u.file.current_line_num++;


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

Reply via email to