[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS ext/spl/spl_directory.c

2010-06-24 Thread Felipe Pena
felipe   Thu, 24 Jun 2010 23:10:39 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=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 @@
 PHPNEWS
 |||
 ?? 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.c2010-06-24 
22:53:14 UTC (rev 300740)
+++ php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c2010-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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS ext/spl/spl_directory.c ext/spl/tests/bug51532.phpt

2010-04-26 Thread Etienne Kneuss
colder   Tue, 27 Apr 2010 05:03:17 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=298635

Log:
Merge fix for #51532

Bug: http://bugs.php.net/51532 (Closed) Cannot override SplFileObject::fscanf()
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c
A   php/php-src/branches/PHP_5_2/ext/spl/tests/bug51532.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-04-27 04:58:44 UTC (rev 298634)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-04-27 05:03:17 UTC (rev 298635)
@@ -29,6 +29,7 @@
   (Daniel Egeberg)
 - Fixed bug #51562 (query timeout in mssql can not be changed per query).
   (ejsmont dot artur at gmail dot com)
+- Fixed bug #51532 (Wrong prototype for SplFileObject::fscanf()). (Etienne)
 - Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection). (Felipe)
 - Fixed bug #51393 (DateTime::createFromFormat() fails if format string 
contains
   timezone). (Adam)

Modified: php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c
===
--- php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c2010-04-27 
04:58:44 UTC (rev 298634)
+++ php/php-src/branches/PHP_5_2/ext/spl/spl_directory.c2010-04-27 
05:03:17 UTC (rev 298635)
@@ -2264,9 +2264,8 @@
 ZEND_END_ARG_INFO()

 static
-ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fscanf, 1, 0, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fscanf, 0, 0, 1)
ZEND_ARG_INFO(0, format)
-   ZEND_ARG_INFO(1, ...)
 ZEND_END_ARG_INFO()

 static

Added: php/php-src/branches/PHP_5_2/ext/spl/tests/bug51532.phpt
===
--- php/php-src/branches/PHP_5_2/ext/spl/tests/bug51532.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/spl/tests/bug51532.phpt2010-04-27 
05:03:17 UTC (rev 298635)
@@ -0,0 +1,14 @@
+--TEST--
+SPL: Allow valid extension of SplFileObject::fscanf
+--FILE--
+?php
+
+class A extends SplFileObject {
+public function fscanf($format) {
+
+}
+}
+?
+===DONE===
+--EXPECT--
+===DONE===

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