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

2006-12-08 Thread changelog
changelog   Sat Dec  9 01:31:06 2006 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1032r2=1.1033diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1032 ZendEngine2/ChangeLog:1.1033
--- ZendEngine2/ChangeLog:1.1032Fri Dec  8 01:31:00 2006
+++ ZendEngine2/ChangeLog   Sat Dec  9 01:31:06 2006
@@ -1,3 +1,24 @@
+2006-12-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend_execute.c
+  zend_object_handlers.c
+  tests/bug38146.phpt
+  tests/bug39775.phpt:
+  Fixed bug #39775 (Indirect modification ... message is not shown)
+
+* (PHP_5_2)
+  zend_execute.c
+  zend_object_handlers.c
+  tests/bug38146.phpt
+  tests/bug39775.phpt
+  tests/bug39775.phpt:
+  Fixed bug #39775 (Indirect modification ... message is not shown)
+  The fix breaks two SimpleXML tests those must be fixed
+
+* zend_alloc.c
+  zend_alloc.c:
+  Fixed possible failure
+
 2006-12-07  Antony Dovgal  [EMAIL PROTECTED]
 
 * (PHP_5_2)
@@ -16005,7 +16026,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1032 2006/12/08 01:31:00 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1033 2006/12/09 01:31:06 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -17729,7 +17750,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1032 2006/12/08 01:31:00 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1033 2006/12/09 01:31:06 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre/tests bug21758.phpt bug27011.phpt bug38600.phpt

2006-12-08 Thread Nuno Lopes
nlopess Fri Dec  8 12:13:23 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/pcre/tests bug21758.phpt bug27011.phpt bug38600.phpt 
  Log:
  add tests for old bug reports
  

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug21758.phpt?view=markuprev=1.1
Index: php-src/ext/pcre/tests/bug21758.phpt
+++ php-src/ext/pcre/tests/bug21758.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug27011.phpt?view=markuprev=1.1
Index: php-src/ext/pcre/tests/bug27011.phpt
+++ php-src/ext/pcre/tests/bug27011.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug38600.phpt?view=markuprev=1.1
Index: php-src/ext/pcre/tests/bug38600.phpt
+++ php-src/ext/pcre/tests/bug38600.phpt

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



[PHP-CVS] cvs: php-src /ext/pcre/tests bug21758.phpt bug27011.phpt bug38600.phpt

2006-12-08 Thread Nuno Lopes
nlopess Fri Dec  8 12:15:21 2006 UTC

  Modified files:  
/php-src/ext/pcre/tests bug21758.phpt bug27011.phpt bug38600.phpt 
  Log:
  MFB: new tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug21758.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/pcre/tests/bug21758.phpt
diff -u /dev/null php-src/ext/pcre/tests/bug21758.phpt:1.2
--- /dev/null   Fri Dec  8 12:15:21 2006
+++ php-src/ext/pcre/tests/bug21758.phptFri Dec  8 12:15:21 2006
@@ -0,0 +1,28 @@
+--TEST--
+Bug #27011: preg_replace_callback() not working with class methods
+--FILE--
+?php
+  class Foo {
+function foo() {
+  
+  $s = 'preg_replace() is broken';
+  
+  var_dump(preg_replace_callback(
+  '/broken/',
+  array($this, 'bar'),
+  $s
+   ));
+}
+
+function bar() {
+  return 'working';
+}
+
+  } // of Foo
+
+  $o = new Foo;
+?
+--EXPECT--
+string(25) preg_replace() is working
+--UEXPECT--
+unicode(25) preg_replace() is working
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug27011.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/pcre/tests/bug27011.phpt
diff -u /dev/null php-src/ext/pcre/tests/bug27011.phpt:1.2
--- /dev/null   Fri Dec  8 12:15:21 2006
+++ php-src/ext/pcre/tests/bug27011.phptFri Dec  8 12:15:21 2006
@@ -0,0 +1,13 @@
+--TEST--
+Bug #27011: segfault in preg_match_all()
+--FILE--
+?php
+
+var_dump(preg_match_all('|(\w+)://([^\s]*[\w+#?/=])|', This is a text 
string, $matches, PREG_SET_ORDER));
+var_dump($matches);
+
+?
+--EXPECT--
+int(0)
+array(0) {
+}
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/tests/bug38600.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/pcre/tests/bug38600.phpt
diff -u /dev/null php-src/ext/pcre/tests/bug38600.phpt:1.2
--- /dev/null   Fri Dec  8 12:15:21 2006
+++ php-src/ext/pcre/tests/bug38600.phptFri Dec  8 12:15:21 2006
@@ -0,0 +1,14 @@
+--TEST--
+Bug #38600: infinite loop in pcre with extended class
+--FILE--
+?php
+$foo = 'bla bla bla';
+
+var_dump(preg_match('/(?!\w)(0x[\p{N}]+[lL]?|[\p{Nd}]+(e[\p{Nd}]*)?[lLdDfF]?)(?!\w)/',
 $foo, $m));
+var_dump($m);
+
+?
+--EXPECT--
+int(0)
+array(0) {
+}

-- 
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/assert assert03.phpt assert04.phpt

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 14:38:54 2006 UTC

  Added files: 
/php-src/ext/standard/tests/assert  assert03.phpt assert04.phpt 
  Log:
  add new tests by zoe dot slattery at googlemail dot co dot uk
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/assert/assert03.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/assert/assert03.phpt
+++ php-src/ext/standard/tests/assert/assert03.phpt
--TEST--
assert() - set callback using ini_set()
--FILE--
?php
function a($file,$line,$myev)
{ 
echo assertion failed - a - $line,\$myev\\n;
}
 
function b($file,$line,$myev)
{ 
echo assertion failed - b - $line,\$myev\\n;
}
 
assert_options(ASSERT_ACTIVE,1);
assert_options(ASSERT_QUIET_EVAL,1);
assert_options(ASSERT_WARNING,0);
 
$a = 0;
 
assert_options(ASSERT_CALLBACK,a);
assert('$a != 0');
 
 /* Modify call back using ini_set() */
ini_set(assert.callback, b);
assert('$a != 0');

?
==DONE==
--EXPECTF--
assertion failed - a - %d,$a != 0
assertion failed - b - %d,$a != 0
==DONE==

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/assert/assert04.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/assert/assert04.phpt
+++ php-src/ext/standard/tests/assert/assert04.phpt
--TEST--
misc assert() tests tests
--FILE--
?php
/* Assert not active */
assert_options(ASSERT_ACTIVE, 0);
assert(1);
 
 
/* Wrong parameter count in assert */
assert_options(ASSERT_ACTIVE, 1);
assert(2,3);
 
/* Wrong parameter count in assert_options */
assert_options(ASSERT_ACTIVE, 0, 2);
 
/* Wrong parameter name in assert_options */
$test=ASSERT_FRED;
assert_options($test, 1);
 
/* Assert false */
assert(0);
 
 
/* Assert false and bail*/
assert_options(ASSERT_BAIL, 1);
assert(0);
 
echo not reached\n;
 
?
--EXPECTF--
Warning: Wrong parameter count for assert() in %s on line %d

Warning: Wrong parameter count for assert_options() in %s on line %d

Warning: assert_options(): Unknown value 0 in %s on line %d

Warning: assert(): Assertion failed in %s on line %d

Warning: assert(): Assertion failed in %s on line %d

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/assert assert03.phpt assert04.phpt

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 14:39:25 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/assert  assert03.phpt assert04.phpt 
  Log:
  add new tests by zoe dot slattery at googlemail dot co dot uk
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/assert/assert03.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/assert/assert03.phpt
+++ php-src/ext/standard/tests/assert/assert03.phpt
--TEST--
assert() - set callback using ini_set()
--FILE--
?php
function a($file,$line,$myev)
{ 
echo assertion failed - a - $line,\$myev\\n;
}
 
function b($file,$line,$myev)
{ 
echo assertion failed - b - $line,\$myev\\n;
}
 
assert_options(ASSERT_ACTIVE,1);
assert_options(ASSERT_QUIET_EVAL,1);
assert_options(ASSERT_WARNING,0);
 
$a = 0;
 
assert_options(ASSERT_CALLBACK,a);
assert('$a != 0');
 
 /* Modify call back using ini_set() */
ini_set(assert.callback, b);
assert('$a != 0');

?
==DONE==
--EXPECTF--
assertion failed - a - %d,$a != 0
assertion failed - b - %d,$a != 0
==DONE==

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/assert/assert04.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/assert/assert04.phpt
+++ php-src/ext/standard/tests/assert/assert04.phpt
--TEST--
misc assert() tests tests
--FILE--
?php
/* Assert not active */
assert_options(ASSERT_ACTIVE, 0);
assert(1);
 
 
/* Wrong parameter count in assert */
assert_options(ASSERT_ACTIVE, 1);
assert(2,3);
 
/* Wrong parameter count in assert_options */
assert_options(ASSERT_ACTIVE, 0, 2);
 
/* Wrong parameter name in assert_options */
$test=ASSERT_FRED;
assert_options($test, 1);
 
/* Assert false */
assert(0);
 
 
/* Assert false and bail*/
assert_options(ASSERT_BAIL, 1);
assert(0);
 
echo not reached\n;
 
?
--EXPECTF--
Warning: Wrong parameter count for assert() in %s on line %d

Warning: Wrong parameter count for assert_options() in %s on line %d

Warning: assert_options(): Unknown value 0 in %s on line %d

Warning: assert(): Assertion failed in %s on line %d

Warning: assert(): Assertion failed in %s on line %d

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/filter filter.c

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 17:04:01 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/filter filter.c 
  Log:
  revert the fix for #39763
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.52.2.33r2=1.52.2.34diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.52.2.33 
php-src/ext/filter/filter.c:1.52.2.34
--- php-src/ext/filter/filter.c:1.52.2.33   Thu Dec  7 11:00:08 2006
+++ php-src/ext/filter/filter.c Fri Dec  8 17:04:01 2006
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.52.2.33 2006/12/07 11:00:08 tony2001 Exp $ */
+/* $Id: filter.c,v 1.52.2.34 2006/12/08 17:04:01 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -275,7 +275,7 @@
 {
php_info_print_table_start();
php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.52.2.33 $);
+   php_info_print_table_row( 2, Revision, $Revision: 1.52.2.34 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -397,6 +397,8 @@
Z_STRVAL(new_var) = estrndup(*val, val_len);
INIT_PZVAL(tmp_new_var);
php_zval_filter(tmp_new_var, IF_G(default_filter), 
IF_G(default_filter_flags), NULL, NULL/*charset*/, 0 TSRMLS_CC);
+   } else if (PG(magic_quotes_gpc)) {
+   Z_STRVAL(new_var) = php_addslashes(*val, 
Z_STRLEN(new_var), Z_STRLEN(new_var), 0 TSRMLS_CC);
} else {
Z_STRVAL(new_var) = estrndup(*val, val_len);
}

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 17:11:42 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  -BFN
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.411r2=1.2027.2.547.2.412diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.411 php-src/NEWS:1.2027.2.547.2.412
--- php-src/NEWS:1.2027.2.547.2.411 Fri Dec  8 15:55:30 2006
+++ php-src/NEWSFri Dec  8 17:11:42 2006
@@ -50,7 +50,6 @@
 - Fixed wrong signature initialization in imagepng (Takeshi Abe)
 - Added optimization for imageline with horizontal and vertial lines (Pierre)
 - Fixed bug #39775 (Indirect modification ... message is not shown). (Dmitry)
-- Fixed bug #39763 (magic quotes are applied twice by ext/filter). (Tony)
 - Fixed bug #39754 (Some POSIX extension functions not thread safe).
   (Ilia, wharmby at uk dot ibm dot com)
 - Fixed bug #39724 (Broken build due to spl/filter usage of pcre extension).

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



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

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 17:03:27 2006 UTC

  Modified files:  
/php-src/ext/filter filter.c 
  Log:
  revert the fix for #39763
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.81r2=1.82diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.81 php-src/ext/filter/filter.c:1.82
--- php-src/ext/filter/filter.c:1.81Thu Dec  7 10:59:35 2006
+++ php-src/ext/filter/filter.c Fri Dec  8 17:03:26 2006
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.81 2006/12/07 10:59:35 tony2001 Exp $ */
+/* $Id: filter.c,v 1.82 2006/12/08 17:03:26 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -275,7 +275,7 @@
 {
php_info_print_table_start();
php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.81 $);
+   php_info_print_table_row( 2, Revision, $Revision: 1.82 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -397,7 +397,13 @@
Z_STRVAL(new_var) = estrndup(*val, val_len);
INIT_PZVAL(tmp_new_var);
php_zval_filter(tmp_new_var, IF_G(default_filter), 
IF_G(default_filter_flags), NULL, NULL/*charset*/, 0 TSRMLS_CC);
-   } else {
+   }
+#if PHP_VERSION_ID6
+   else if (PG(magic_quotes_gpc)) {
+   Z_STRVAL(new_var) = php_addslashes(*val, 
Z_STRLEN(new_var), Z_STRLEN(new_var), 0 TSRMLS_CC);
+   }
+#endif
+   else {
Z_STRVAL(new_var) = estrndup(*val, val_len);
}
} else { /* empty string */

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/filter filter.c /ext/filter/tests bug39763.phpt

2006-12-08 Thread Ilia Alshanetsky
iliaa   Fri Dec  8 17:50:04 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/filter/tests   bug39763.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/filter filter.c 
  Log:
  Fixed bug #39763 (magic quotes are applied twice by ext/filter in
  parse_str())
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.412r2=1.2027.2.547.2.413diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.412 php-src/NEWS:1.2027.2.547.2.413
--- php-src/NEWS:1.2027.2.547.2.412 Fri Dec  8 17:11:42 2006
+++ php-src/NEWSFri Dec  8 17:50:03 2006
@@ -50,6 +50,8 @@
 - Fixed wrong signature initialization in imagepng (Takeshi Abe)
 - Added optimization for imageline with horizontal and vertial lines (Pierre)
 - Fixed bug #39775 (Indirect modification ... message is not shown). (Dmitry)
+- Fixed bug #39763 (magic quotes are applied twice by ext/filter in
+  parse_str()). (Ilia) 
 - Fixed bug #39754 (Some POSIX extension functions not thread safe).
   (Ilia, wharmby at uk dot ibm dot com)
 - Fixed bug #39724 (Broken build due to spl/filter usage of pcre extension).
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.52.2.34r2=1.52.2.35diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.52.2.34 
php-src/ext/filter/filter.c:1.52.2.35
--- php-src/ext/filter/filter.c:1.52.2.34   Fri Dec  8 17:04:01 2006
+++ php-src/ext/filter/filter.c Fri Dec  8 17:50:04 2006
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.52.2.34 2006/12/08 17:04:01 tony2001 Exp $ */
+/* $Id: filter.c,v 1.52.2.35 2006/12/08 17:50:04 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -275,7 +275,7 @@
 {
php_info_print_table_start();
php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.52.2.34 $);
+   php_info_print_table_row( 2, Revision, $Revision: 1.52.2.35 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -397,7 +397,7 @@
Z_STRVAL(new_var) = estrndup(*val, val_len);
INIT_PZVAL(tmp_new_var);
php_zval_filter(tmp_new_var, IF_G(default_filter), 
IF_G(default_filter_flags), NULL, NULL/*charset*/, 0 TSRMLS_CC);
-   } else if (PG(magic_quotes_gpc)) {
+   } else if (PG(magic_quotes_gpc)  !retval) { /* for 
PARSE_STRING php_register_variable_safe() will do the addslashes() */
Z_STRVAL(new_var) = php_addslashes(*val, 
Z_STRLEN(new_var), Z_STRLEN(new_var), 0 TSRMLS_CC);
} else {
Z_STRVAL(new_var) = estrndup(*val, val_len);

http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/bug39763.phpt?view=markuprev=1.1
Index: php-src/ext/filter/tests/bug39763.phpt
+++ php-src/ext/filter/tests/bug39763.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_2) /ext/simplexml/tests 027.phpt bug35785.phpt

2006-12-08 Thread Rob Richards
rrichards   Fri Dec  8 17:55:58 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/simplexml/testsbug35785.phpt 027.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug35785.phpt?r1=1.1.2.5.2.1r2=1.1.2.5.2.2diff_format=u
Index: php-src/ext/simplexml/tests/bug35785.phpt
diff -u php-src/ext/simplexml/tests/bug35785.phpt:1.1.2.5.2.1 
php-src/ext/simplexml/tests/bug35785.phpt:1.1.2.5.2.2
--- php-src/ext/simplexml/tests/bug35785.phpt:1.1.2.5.2.1   Tue Jun 27 
00:09:43 2006
+++ php-src/ext/simplexml/tests/bug35785.phpt   Fri Dec  8 17:55:58 2006
@@ -25,4 +25,9 @@
 ===FAIL===
 int(0)
 
-Fatal error: Objects used as arrays in post/pre increment/decrement must 
return values by reference in %sbug35785.php on line %d
+Notice: Indirect modification of overloaded element of SimpleXMLElement has no 
effect in %sbug35785.php on line %d
+
+Strict Standards: Creating default object from empty value in %sbug35785.php 
on line %d
+?xml version=1.0?
+rootblaposts//bla/root
+===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/027.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u
Index: php-src/ext/simplexml/tests/027.phpt
diff -u php-src/ext/simplexml/tests/027.phpt:1.1.2.3 
php-src/ext/simplexml/tests/027.phpt:1.1.2.3.2.1
--- php-src/ext/simplexml/tests/027.phpt:1.1.2.3Tue Mar  7 15:22:48 2006
+++ php-src/ext/simplexml/tests/027.phptFri Dec  8 17:55:58 2006
@@ -71,4 +71,5 @@
   /person
 /people
 
-Fatal error: Objects used as arrays in post/pre increment/decrement must 
return values by reference in %s027.php on line %d
+Notice: Indirect modification of overloaded element of SimpleXMLElement has no 
effect in %s027.php on line %d
+===DONE===

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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/filter filter.c /ext/filter/tests bug39763.phpt

2006-12-08 Thread Stefan Esser

   php_zval_filter(tmp_new_var, IF_G(default_filter), 
 IF_G(default_filter_flags), NULL, NULL/*charset*/, 0 TSRMLS_CC);
 - } else if (PG(magic_quotes_gpc)) {
 + } else if (PG(magic_quotes_gpc)  !retval) { /* for 
 PARSE_STRING php_register_variable_safe() will do the addslashes() */
   Z_STRVAL(new_var) = php_addslashes(*val, 
 Z_STRLEN(new_var), Z_STRLEN(new_var), 0 TSRMLS_CC);
   
This comment is wrong. It is not php_register_variable_safe() but
ext/filter that adds the magic_quotes.

And Antony's previous commit never fixed anything, it just broke
magic_quotes_gpc and completely disabled it, introducing possible SQL
injection vulnerabilities in tons of scripts...

BTW: When will ext/filter be rewritten to
a) support daisy chaining
b) does not register the variables itself but actually work as filters
were supposed to do.
c) Support Cookies correctly...

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(PHP_5_2) / NEWS /ext/filter filter.c /ext/filter/tests bug39763.phpt

2006-12-08 Thread Ilia Alshanetsky

On 8-Dec-06, at 1:26 PM, Stefan Esser wrote:



 			php_zval_filter(tmp_new_var, IF_G(default_filter), IF_G 
(default_filter_flags), NULL, NULL/*charset*/, 0 TSRMLS_CC);

-   } else if (PG(magic_quotes_gpc)) {
+		} else if (PG(magic_quotes_gpc)  !retval) { /* for  
PARSE_STRING php_register_variable_safe() will do the addslashes() */
 			Z_STRVAL(new_var) = php_addslashes(*val, Z_STRLEN(new_var),  
Z_STRLEN(new_var), 0 TSRMLS_CC);



This comment is wrong. It is not php_register_variable_safe() but
ext/filter that adds the magic_quotes.


This is where you are incorrect, take a look at  
php_register_variable_safe() line #51. The reason we don't apply  
magic quotes for PARSE_STRING (retval == 1) is because the return  
value of the function in this instance is 1, which causes  
php_register_variable_safe() to be executed on the returned value.



a) support daisy chaining


Can you not provide your own hooks and have them call the stock  
filter functions?



b) does not register the variables itself but actually work as filters
were supposed to do.


I think it makes the API simpler, but it would not be major change to  
make if there was a really good reason to do so.



c) Support Cookies correctly...


Can you elaborate in terms of what is missing in cookie support?

Ilia Alshanetsky

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



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

2006-12-08 Thread Andrei Zmievski
andrei  Fri Dec  8 19:13:31 2006 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  Don't use zend_ascii_hash_find() here -- module names are binary strings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.711r2=1.712diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.711 php-src/main/main.c:1.712
--- php-src/main/main.c:1.711   Tue Dec  5 02:55:27 2006
+++ php-src/main/main.c Fri Dec  8 19:13:31 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.711 2006/12/05 02:55:27 stas Exp $ */
+/* $Id: main.c,v 1.712 2006/12/08 19:13:31 andrei Exp $ */
 
 /* {{{ includes
  */
@@ -1764,7 +1764,7 @@
if (sapi_module.additional_functions) {
zend_module_entry *module;
 
-   if (zend_ascii_hash_find(module_registry, standard, 
sizeof(standard), (void**)module)==SUCCESS) {
+   if (zend_hash_find(module_registry, standard, 
sizeof(standard), (void**)module)==SUCCESS) {
EG(current_module) = module;
zend_register_functions(NULL, 
sapi_module.additional_functions, NULL, MODULE_PERSISTENT TSRMLS_CC);
EG(current_module) = NULL;

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



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

2006-12-08 Thread Andrei Zmievski
andrei  Fri Dec  8 19:13:51 2006 UTC

  Modified files:  
/php-src/ext/standard   dl.c 
  Log:
  Unicode filename support in dl().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dl.c?r1=1.110r2=1.111diff_format=u
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.110 php-src/ext/standard/dl.c:1.111
--- php-src/ext/standard/dl.c:1.110 Sun Oct  8 13:34:23 2006
+++ php-src/ext/standard/dl.c   Fri Dec  8 19:13:51 2006
@@ -18,13 +18,14 @@
+--+
 */
 
-/* $Id: dl.c,v 1.110 2006/10/08 13:34:23 bjori Exp $ */
+/* $Id: dl.c,v 1.111 2006/12/08 19:13:51 andrei Exp $ */
 
 #include php.h
 #include dl.h
 #include php_globals.h
 #include php_ini.h
 #include ext/standard/info.h
+#include ext/standard/file.h
 
 #include SAPI.h
 
@@ -52,20 +53,17 @@
 #endif /* defined(HAVE_LIBDL) || HAVE_MACH_O_DYLD_H */
 
 
-/* {{{ proto int dl(string extension_filename)
+/* {{{ proto int dl(string extension_filename) U
Load a PHP extension at runtime */
 PHP_FUNCTION(dl)
 {
-   zval **file;
+   zval *filename;
 
-   /* obtain arguments */
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, file) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z, filename) == 
FAILURE) {
+   return;
}
 
-   convert_to_string_ex(file);
-
-   php_dl(*file, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
+   php_dl(filename, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC);
EG(full_tables_cleanup) = 1;
 }
 
@@ -90,6 +88,8 @@
zend_module_entry *(*get_module)(void);
int error_type;
char *extension_dir;
+   char *filename;
+   int filename_len;
 
if (type == MODULE_PERSISTENT) {
extension_dir = INI_STR(extension_dir);
@@ -103,18 +103,31 @@
error_type = E_CORE_WARNING;
}
 
+   if (Z_TYPE_P(file) == IS_UNICODE) {
+   if (FAILURE == php_stream_path_encode(NULL, filename, 
filename_len, Z_USTRVAL_P(file), Z_USTRLEN_P(file), REPORT_ERRORS, 
FG(default_context))) {
+   return;
+   }
+   } else {
+   filename = Z_STRVAL_P(file);
+   filename_len = Z_STRLEN_P(file);
+   }
+
if (extension_dir  extension_dir[0]){
int extension_dir_len = strlen(extension_dir);
 
-   libpath = emalloc(extension_dir_len+Z_STRLEN_P(file)+2);
+   libpath = emalloc(extension_dir_len+filename_len+2);
 
if (IS_SLASH(extension_dir[extension_dir_len-1])) {
-   sprintf(libpath, %s%s, extension_dir, 
Z_STRVAL_P(file)); /* SAFE */
+   sprintf(libpath, %s%s, extension_dir, filename); /* 
SAFE */
} else {
-   sprintf(libpath, %s%c%s, extension_dir, 
DEFAULT_SLASH, Z_STRVAL_P(file)); /* SAFE */
+   sprintf(libpath, %s%c%s, extension_dir, 
DEFAULT_SLASH, filename); /* SAFE */
}
} else {
-   libpath = estrndup(Z_STRVAL_P(file), Z_STRLEN_P(file));
+   libpath = estrndup(filename, filename_len);
+   }
+
+   if (Z_TYPE_P(file) == IS_UNICODE) {
+   efree(filename);
}
 
/* load dynamic symbol */
@@ -141,7 +154,7 @@
 
if (!get_module) {
DL_UNLOAD(handle);
-   php_error_docref(NULL TSRMLS_CC, error_type, Invalid library 
(maybe not a PHP library) '%s', Z_STRVAL_P(file));
+   php_error_docref(NULL TSRMLS_CC, error_type, Invalid library 
(maybe not a PHP library) '%R', Z_TYPE_P(file), Z_UNIVAL_P(file));
RETURN_FALSE;
}
module_entry = get_module();
@@ -229,7 +242,7 @@
 
 void php_dl(zval *file, int type, zval *return_value, int start_now TSRMLS_DC)
 {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot dynamically load %s 
- dynamic modules are not supported, Z_STRVAL_P(file));
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot dynamically load %R 
- dynamic modules are not supported, Z_TYPE_P(file), Z_UNIVAL_P(file));
RETURN_FALSE;
 }
 

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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/filter filter.c /ext/filter/tests bug39763.phpt

2006-12-08 Thread Ilia Alshanetsky


On 8-Dec-06, at 2:05 PM, Stefan Esser wrote:


a) support daisy chaining


Can you not provide your own hooks and have them call the stock  
filter

functions?

I (my extensions) have no problem with that. I just wonder why PHP got
input filter hooks in one version and in a few versions later they are
not useable anymore, because ext/filter grabs them.


Don't get me wrong its not a bad idea to have daisy chaining, its  
just that there was no need for it expressed before so it was never  
done.


b) does not register the variables itself but actually work as  
filters

were supposed to do.

I think it makes the API simpler, but it would not be major change to
make if there was a really good reason to do so.

The reason is simple: The filter extension abuses the input filtering
hooks. The variables are no longer registered at one single place but
several codepaths lead to different results.
The bug you fixed with your commit is the best example: If ext/filter
would not try to register the variables itself, this bug would never
have happened.


There are a few reasons why it is doing it, foremost of which is the  
attempt to reduce the amount of memory utilized while registering  
variables. The last thing we want to do is allocate, re-allocate and  
so on every input parameter. I suspect there is a way to achieve a  
solution that would prevent duplication of data, which we still have  
right now with the RAW filter.



c) Support Cookies correctly...

Very simple: In some earlier version php_register_variable_ex was
changed to handle cookies different from other variables: Cookies with
the same name will get dropped after the first is registered.
In ext filter the raw variables still have this behaviour but the
filtered variables behave different...


I need to look into that, I recall adding checks for cookie hierarchy  
based on paths into core PHP, but I have not played with the  
equivalent filter code yet.


Ilia Alshanetsky

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



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

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 20:17:31 2006 UTC

  Modified files:  
/php-src/ext/standard   iptc.c 
  Log:
  fix typo
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/iptc.c?r1=1.57r2=1.58diff_format=u
Index: php-src/ext/standard/iptc.c
diff -u php-src/ext/standard/iptc.c:1.57 php-src/ext/standard/iptc.c:1.58
--- php-src/ext/standard/iptc.c:1.57Thu Dec  7 21:11:54 2006
+++ php-src/ext/standard/iptc.c Fri Dec  8 20:17:31 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: iptc.c,v 1.57 2006/12/07 21:11:54 andrei Exp $ */
+/* $Id: iptc.c,v 1.58 2006/12/08 20:17:31 tony2001 Exp $ */
 
 /*
  * Functions to parse  compse IPTC data.
@@ -187,7 +187,7 @@
unsigned char *spoolbuf=0, *poi=0;
struct stat sb;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, SZ|l, iptcdata, 
iptcdata_len, pp_jpeg_file, spool) == FAILURE ||
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, SZ|l, iptcdata, 
iptcdata_len, pp_jpeg_file, spool) == FAILURE ||
php_stream_path_param_encode(pp_jpeg_file, jpeg_file, 
jpeg_file_len, REPORT_ERRORS, FG(default_context)) == FAILURE) {
return;
}

-- 
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_lob.c php_oci8_int.h

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 20:55:14 2006 UTC

  Modified files:  
/php-src/ext/oci8   oci8_lob.c php_oci8_int.h 
  Log:
  fix #39732 (oci_bind_array_by_name doesn't work on Solaris 64bit)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_lob.c?r1=1.22r2=1.23diff_format=u
Index: php-src/ext/oci8/oci8_lob.c
diff -u php-src/ext/oci8/oci8_lob.c:1.22 php-src/ext/oci8/oci8_lob.c:1.23
--- php-src/ext/oci8/oci8_lob.c:1.22Fri Nov 10 23:03:23 2006
+++ php-src/ext/oci8/oci8_lob.c Fri Dec  8 20:55:13 2006
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: oci8_lob.c,v 1.22 2006/11/10 23:03:23 tony2001 Exp $ */
+/* $Id: oci8_lob.c,v 1.23 2006/12/08 20:55:13 tony2001 Exp $ */
 
 
 
@@ -500,7 +500,7 @@
 int php_oci_lob_copy (php_oci_descriptor *descriptor_dest, php_oci_descriptor 
*descriptor_from, long length TSRMLS_DC)
 {
php_oci_connection *connection = descriptor_dest-connection;
-   int length_dest, length_from, copy_len;
+   ub4 length_dest, length_from, copy_len;

if (php_oci_lob_get_length(descriptor_dest, length_dest TSRMLS_CC)) {
return 1;
@@ -767,7 +767,7 @@
 
 /* {{{ php_oci_lob_erase()
  Erase (or fill with whitespaces, depending on LOB type) the LOB (or its part) 
*/
-int php_oci_lob_erase (php_oci_descriptor *descriptor, long offset, long 
length, ub4 *bytes_erased TSRMLS_DC)
+int php_oci_lob_erase (php_oci_descriptor *descriptor, long offset, ub4 
length, ub4 *bytes_erased TSRMLS_DC)
 {
php_oci_connection *connection = descriptor-connection;
OCILobLocator *lob = descriptor-descriptor;
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.26r2=1.27diff_format=u
Index: php-src/ext/oci8/php_oci8_int.h
diff -u php-src/ext/oci8/php_oci8_int.h:1.26 
php-src/ext/oci8/php_oci8_int.h:1.27
--- php-src/ext/oci8/php_oci8_int.h:1.26Fri Nov 10 23:03:23 2006
+++ php-src/ext/oci8/php_oci8_int.h Fri Dec  8 20:55:14 2006
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: php_oci8_int.h,v 1.26 2006/11/10 23:03:23 tony2001 Exp $ */
+/* $Id: php_oci8_int.h,v 1.27 2006/12/08 20:55:14 tony2001 Exp $ */
 
 #if HAVE_OCI8
 # ifndef PHP_OCI8_INT_H
@@ -191,9 +191,9 @@
 /* ub2 *indicators; */
ub2 *element_lengths;
 /* ub2 *retcodes;  */
-   long current_length;
-   long old_length;
-   long max_length;
+   ub4 current_length;
+   ub4 old_length;
+   ub4 max_length;
long type;
} array;
sb2 indicator;  /* -1 means NULL */
@@ -347,7 +347,7 @@
 int php_oci_lob_import(php_oci_descriptor *descriptor, char * TSRMLS_DC);
 int php_oci_lob_append (php_oci_descriptor *, php_oci_descriptor * TSRMLS_DC);
 int php_oci_lob_truncate (php_oci_descriptor *, long TSRMLS_DC);
-int php_oci_lob_erase (php_oci_descriptor *, long, long, ub4 * TSRMLS_DC);
+int php_oci_lob_erase (php_oci_descriptor *, long, ub4, ub4 * TSRMLS_DC);
 int php_oci_lob_is_equal (php_oci_descriptor *, php_oci_descriptor *, boolean 
* TSRMLS_DC);
 #if defined(HAVE_OCI_LOB_READ2)
 sb4 php_oci_lob_callback (dvoid *ctxp, CONST dvoid *bufxp, oraub8 len, ub1 
piece, dvoid **changed_bufpp, oraub8 *changed_lenp);

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/oci8 oci8_lob.c php_oci8_int.h

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 20:56:29 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/oci8   oci8_lob.c php_oci8_int.h 
  Log:
  MFH: fix #39732 (oci_bind_array_by_name doesn't work on Solaris 64bit)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.414r2=1.2027.2.547.2.415diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.414 php-src/NEWS:1.2027.2.547.2.415
--- php-src/NEWS:1.2027.2.547.2.414 Fri Dec  8 19:50:40 2006
+++ php-src/NEWSFri Dec  8 20:56:29 2006
@@ -56,6 +56,8 @@
   sets in pdo_mysql). (Ilia)
 - Fixed bug #39754 (Some POSIX extension functions not thread safe).
   (Ilia, wharmby at uk dot ibm dot com)
+- Fixed bug #39732 (oci_bind_array_by_name doesn't work on Solaris 64bit). 
+  (Tony)
 - Fixed bug #39724 (Broken build due to spl/filter usage of pcre extension).
   (Tony, Ilia)
 - Fixed bug #39718 (possible crash if assert.callback is set in ini). (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_lob.c?r1=1.7.2.6.2.7r2=1.7.2.6.2.8diff_format=u
Index: php-src/ext/oci8/oci8_lob.c
diff -u php-src/ext/oci8/oci8_lob.c:1.7.2.6.2.7 
php-src/ext/oci8/oci8_lob.c:1.7.2.6.2.8
--- php-src/ext/oci8/oci8_lob.c:1.7.2.6.2.7 Fri Nov 10 23:03:32 2006
+++ php-src/ext/oci8/oci8_lob.c Fri Dec  8 20:56:29 2006
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: oci8_lob.c,v 1.7.2.6.2.7 2006/11/10 23:03:32 tony2001 Exp $ */
+/* $Id: oci8_lob.c,v 1.7.2.6.2.8 2006/12/08 20:56:29 tony2001 Exp $ */
 
 
 
@@ -493,7 +493,7 @@
 int php_oci_lob_copy (php_oci_descriptor *descriptor_dest, php_oci_descriptor 
*descriptor_from, long length TSRMLS_DC)
 {
php_oci_connection *connection = descriptor_dest-connection;
-   int length_dest, length_from, copy_len;
+   ub4 length_dest, length_from, copy_len;

if (php_oci_lob_get_length(descriptor_dest, length_dest TSRMLS_CC)) {
return 1;
@@ -760,7 +760,7 @@
 
 /* {{{ php_oci_lob_erase()
  Erase (or fill with whitespaces, depending on LOB type) the LOB (or its part) 
*/
-int php_oci_lob_erase (php_oci_descriptor *descriptor, long offset, long 
length, ub4 *bytes_erased TSRMLS_DC)
+int php_oci_lob_erase (php_oci_descriptor *descriptor, long offset, ub4 
length, ub4 *bytes_erased TSRMLS_DC)
 {
php_oci_connection *connection = descriptor-connection;
OCILobLocator *lob = descriptor-descriptor;
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.11.2.6.2.10r2=1.11.2.6.2.11diff_format=u
Index: php-src/ext/oci8/php_oci8_int.h
diff -u php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.10 
php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.11
--- php-src/ext/oci8/php_oci8_int.h:1.11.2.6.2.10   Fri Nov 10 23:03:32 2006
+++ php-src/ext/oci8/php_oci8_int.h Fri Dec  8 20:56:29 2006
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: php_oci8_int.h,v 1.11.2.6.2.10 2006/11/10 23:03:32 tony2001 Exp $ */
+/* $Id: php_oci8_int.h,v 1.11.2.6.2.11 2006/12/08 20:56:29 tony2001 Exp $ */
 
 #if HAVE_OCI8
 # ifndef PHP_OCI8_INT_H
@@ -183,9 +183,9 @@
 /* ub2 *indicators; */
ub2 *element_lengths;
 /* ub2 *retcodes;  */
-   long current_length;
-   long old_length;
-   long max_length;
+   ub4 current_length;
+   ub4 old_length;
+   ub4 max_length;
long type;
} array;
sb2 indicator;  /* -1 means NULL */
@@ -337,7 +337,7 @@
 int php_oci_lob_import(php_oci_descriptor *descriptor, char * TSRMLS_DC);
 int php_oci_lob_append (php_oci_descriptor *, php_oci_descriptor * TSRMLS_DC);
 int php_oci_lob_truncate (php_oci_descriptor *, long TSRMLS_DC);
-int php_oci_lob_erase (php_oci_descriptor *, long, long, ub4 * TSRMLS_DC);
+int php_oci_lob_erase (php_oci_descriptor *, long, ub4, ub4 * TSRMLS_DC);
 int php_oci_lob_is_equal (php_oci_descriptor *, php_oci_descriptor *, boolean 
* TSRMLS_DC);
 #if defined(HAVE_OCI_LOB_READ2)
 sb4 php_oci_lob_callback (dvoid *ctxp, CONST dvoid *bufxp, oraub8 len, ub1 
piece, dvoid **changed_bufpp, oraub8 *changed_lenp);

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



[PHP-CVS] cvs: php-src /ext/standard php_var.h var.c

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 20:59:06 2006 UTC

  Modified files:  
/php-src/ext/standard   php_var.h var.c 
  Log:
  fix possible issue in the serializer, which might currupt struc when 
reallocating arguments stack
  (no reproduce case, sorry)
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_var.h?r1=1.33r2=1.34diff_format=u
Index: php-src/ext/standard/php_var.h
diff -u php-src/ext/standard/php_var.h:1.33 php-src/ext/standard/php_var.h:1.34
--- php-src/ext/standard/php_var.h:1.33 Tue May 30 14:51:54 2006
+++ php-src/ext/standard/php_var.h  Fri Dec  8 20:59:06 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_var.h,v 1.33 2006/05/30 14:51:54 iliaa Exp $ */
+/* $Id: php_var.h,v 1.34 2006/12/08 20:59:06 tony2001 Exp $ */
 
 #ifndef PHP_VAR_H
 #define PHP_VAR_H
@@ -48,7 +48,7 @@
 
 typedef struct php_unserialize_data php_unserialize_data_t;
 
-PHPAPI void php_var_serialize(smart_str *buf, zval **struc, 
php_serialize_data_t *var_hash TSRMLS_DC);
+PHPAPI void php_var_serialize(smart_str *buf, zval *struc, 
php_serialize_data_t *var_hash TSRMLS_DC);
 PHPAPI int php_var_unserialize(zval **rval, const unsigned char **p, const 
unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC);
 
 #define PHP_VAR_SERIALIZE_INIT(var_hash) \
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.249r2=1.250diff_format=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.249 php-src/ext/standard/var.c:1.250
--- php-src/ext/standard/var.c:1.249Mon Dec  4 18:55:40 2006
+++ php-src/ext/standard/var.c  Fri Dec  8 20:59:06 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: var.c,v 1.249 2006/12/04 18:55:40 andrei Exp $ */
+/* $Id: var.c,v 1.250 2006/12/08 20:59:06 tony2001 Exp $ */
 
 
 
@@ -666,7 +666,7 @@
 
 /* {{{ php_var_serialize */
 
-static void php_var_serialize_intern(smart_str *buf, zval **struc, HashTable 
*var_hash TSRMLS_DC);
+static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable 
*var_hash TSRMLS_DC);
 
 static inline int php_add_var_hash(HashTable *var_hash, zval *var, void 
*var_old TSRMLS_DC)
 {
@@ -765,11 +765,11 @@
smart_str_appendl(buf, \;, 2);
 }
 
-static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval 
**struc TSRMLS_DC)
+static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval 
*struc TSRMLS_DC)
 {
PHP_CLASS_ATTRIBUTES;
 
-   PHP_SET_CLASS_ATTRIBUTES(*struc);
+   PHP_SET_CLASS_ATTRIBUTES(struc);
smart_str_appendl(buf, O:, 2);
smart_str_append_long(buf, name_len);
smart_str_appendl(buf, :\, 2);
@@ -783,7 +783,7 @@
return incomplete_class;
 }
 
-static void php_var_serialize_class(smart_str *buf, zval **struc, zval 
*retval_ptr, HashTable *var_hash TSRMLS_DC)
+static void php_var_serialize_class(smart_str *buf, zval *struc, zval 
*retval_ptr, HashTable *var_hash TSRMLS_DC)
 {
int count;
zend_bool  incomplete_class;
@@ -839,17 +839,17 @@
smart_str_appendl(buf,N;, 2);
continue;
}
-   if (zend_u_hash_find(Z_OBJPROP_PP(struc), 
Z_TYPE_PP(name), Z_UNIVAL_PP(name), 
+   if (zend_u_hash_find(Z_OBJPROP_P(struc), 
Z_TYPE_PP(name), Z_UNIVAL_PP(name), 
Z_UNILEN_PP(name) + 1, (void *) 
d) == SUCCESS) {
if (Z_TYPE_PP(name) == IS_UNICODE) {
php_var_serialize_unicode(buf, 
Z_USTRVAL_PP(name), Z_USTRLEN_PP(name));
} else {
php_var_serialize_string(buf, 
Z_STRVAL_PP(name), Z_STRLEN_PP(name));
}
-   php_var_serialize_intern(buf, d, var_hash 
TSRMLS_CC);
+   php_var_serialize_intern(buf, *d, var_hash 
TSRMLS_CC);
} else {
zend_class_entry *ce;
-   ce = zend_get_class_entry(*struc TSRMLS_CC);
+   ce = zend_get_class_entry(struc TSRMLS_CC);
if (ce) {
zstr prot_name, priv_name;
int prop_name_length;
@@ -857,27 +857,27 @@
do {

zend_u_mangle_property_name(priv_name, prop_name_length, Z_TYPE_PP(name), 
ce-name, ce-name_length, 

Z_UNIVAL_PP(name), Z_UNILEN_PP(name), ce-type  ZEND_INTERNAL_CLASS);
-   if 
(zend_u_hash_find(Z_OBJPROP_PP(struc), Z_TYPE_PP(name), priv_name, 

[PHP-CVS] cvs: php-src /ext/standard php_var.h var.c

2006-12-08 Thread Antony Dovgal
tony2001Fri Dec  8 21:18:16 2006 UTC

  Modified files:  
/php-src/ext/standard   var.c php_var.h 
  Log:
  don't change public API
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.250r2=1.251diff_format=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.250 php-src/ext/standard/var.c:1.251
--- php-src/ext/standard/var.c:1.250Fri Dec  8 20:59:06 2006
+++ php-src/ext/standard/var.c  Fri Dec  8 21:18:16 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: var.c,v 1.250 2006/12/08 20:59:06 tony2001 Exp $ */
+/* $Id: var.c,v 1.251 2006/12/08 21:18:16 tony2001 Exp $ */
 
 
 
@@ -1112,9 +1112,9 @@
} 
 }
 
-PHPAPI void php_var_serialize(smart_str *buf, zval *struc, HashTable *var_hash 
TSRMLS_DC)
+PHPAPI void php_var_serialize(smart_str *buf, zval **struc, HashTable 
*var_hash TSRMLS_DC)
 {
-   php_var_serialize_intern(buf, struc, var_hash TSRMLS_CC);
+   php_var_serialize_intern(buf, *struc, var_hash TSRMLS_CC);
smart_str_0(buf);
 }

@@ -1137,7 +1137,7 @@
Z_STRLEN_P(return_value) = 0;
 
PHP_VAR_SERIALIZE_INIT(var_hash);
-   php_var_serialize(buf, *struc, var_hash TSRMLS_CC);
+   php_var_serialize(buf, struc, var_hash TSRMLS_CC);
PHP_VAR_SERIALIZE_DESTROY(var_hash);
 
if (buf.c) {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_var.h?r1=1.34r2=1.35diff_format=u
Index: php-src/ext/standard/php_var.h
diff -u php-src/ext/standard/php_var.h:1.34 php-src/ext/standard/php_var.h:1.35
--- php-src/ext/standard/php_var.h:1.34 Fri Dec  8 20:59:06 2006
+++ php-src/ext/standard/php_var.h  Fri Dec  8 21:18:16 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: php_var.h,v 1.34 2006/12/08 20:59:06 tony2001 Exp $ */
+/* $Id: php_var.h,v 1.35 2006/12/08 21:18:16 tony2001 Exp $ */
 
 #ifndef PHP_VAR_H
 #define PHP_VAR_H
@@ -48,7 +48,7 @@
 
 typedef struct php_unserialize_data php_unserialize_data_t;
 
-PHPAPI void php_var_serialize(smart_str *buf, zval *struc, 
php_serialize_data_t *var_hash TSRMLS_DC);
+PHPAPI void php_var_serialize(smart_str *buf, zval **struc, 
php_serialize_data_t *var_hash TSRMLS_DC);
 PHPAPI int php_var_unserialize(zval **rval, const unsigned char **p, const 
unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC);
 
 #define PHP_VAR_SERIALIZE_INIT(var_hash) \

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/filter/tests 004.phpt

2006-12-08 Thread Ilia Alshanetsky
iliaa   Sat Dec  9 03:07:32 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/filter/tests   004.phpt 
  Log:
  Fixed test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/004.phpt?r1=1.2.2.1r2=1.2.2.2diff_format=u
Index: php-src/ext/filter/tests/004.phpt
diff -u php-src/ext/filter/tests/004.phpt:1.2.2.1 
php-src/ext/filter/tests/004.phpt:1.2.2.2
--- php-src/ext/filter/tests/004.phpt:1.2.2.1   Thu Aug 31 20:17:03 2006
+++ php-src/ext/filter/tests/004.phpt   Sat Dec  9 03:07:32 2006
@@ -1,11 +1,5 @@
 --TEST--
 GET/POST/REQUEST Test with filtered data
---SKIPIF--
-?php
-/* CGI doesn't read commandline options when it sees REQUES_METHOD */
-die(skip);
-die(not possible to set ini setting using -d and CGI);
-?
 --INI--
 filter.default=special_chars
 --POST--
@@ -26,5 +20,5 @@
 echo $_REQUEST['e'];
 ?
 --EXPECT--
-O#39;HenryBoldquot;quotesquot;\slash
-O#39;HenryBoldquot;quotesquot;\slash
+O#39;Henry#60;b#62;Bold#60;/b#62;#34;quotes#34;\slash
+O#39;Henry#60;b#62;Bold#60;/b#62;#34;quotes#34;\slash

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



[PHP-CVS] cvs: php-src /ext/spl/tests iterator_035.phpt /tests/classes array_access_003.phpt array_access_004.phpt array_access_005.phpt array_access_008.phpt array_access_012.phpt ZendEngine2 zend_

2006-12-08 Thread Dmitry Stogov
dmitry  Fri Dec  8 16:23:05 2006 UTC

  Modified files:  
/ZendEngine2zend_execute.c zend_object_handlers.c 
/ZendEngine2/tests  bug39775.phpt bug38146.phpt 
/php-src/tests/classes  array_access_003.phpt array_access_004.phpt 
array_access_005.phpt array_access_008.phpt 
array_access_012.phpt 
/php-src/ext/spl/tests  iterator_035.phpt 
  Log:
  Fixed bug #39775 (Indirect modification ... message is not shown)
  
  http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.753r2=1.754diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.753 ZendEngine2/zend_execute.c:1.754
--- ZendEngine2/zend_execute.c:1.753Tue Nov  7 20:28:40 2006
+++ ZendEngine2/zend_execute.c  Fri Dec  8 16:23:04 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_execute.c,v 1.753 2006/11/07 20:28:40 iliaa Exp $ */
+/* $Id: zend_execute.c,v 1.754 2006/12/08 16:23:04 dmitry Exp $ */
 
 #define ZEND_INTENSIVE_DEBUGGING 0
 
@@ -1166,16 +1166,21 @@
overloaded_result = 
Z_OBJ_HT_P(container)-read_dimension(container, dim, type TSRMLS_CC);
 
if (overloaded_result) {
-   switch (type) {
-   case BP_VAR_RW:
-   case BP_VAR_W:
-   if 
(Z_TYPE_P(overloaded_result) != IS_OBJECT
-
!overloaded_result-is_ref) {
-   
zend_error_noreturn(E_ERROR, Objects used as arrays in post/pre 
increment/decrement must return values by reference);
-   }
-   break;
+   if (type == BP_VAR_W || type == 
BP_VAR_RW  || type == BP_VAR_UNSET) {
+   if (overloaded_result-refcount 
 0) {
+   zval *tmp = 
overloaded_result;
+
+   
ALLOC_ZVAL(overloaded_result);
+   *overloaded_result = 
*tmp;
+   
zval_copy_ctor(overloaded_result);
+   
overloaded_result-is_ref = 0;
+   
overloaded_result-refcount = 0;
+   }
+   if (Z_TYPE_P(overloaded_result) 
!= IS_OBJECT) {
+   zend_class_entry *ce = 
Z_OBJCE_P(container);
+   zend_error(E_NOTICE, 
Indirect modification of overloaded element of %v has no effect, ce-name);
+   }
}
-
retval = overloaded_result;
} else {
retval = EG(error_zval_ptr);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_object_handlers.c?r1=1.179r2=1.180diff_format=u
Index: ZendEngine2/zend_object_handlers.c
diff -u ZendEngine2/zend_object_handlers.c:1.179 
ZendEngine2/zend_object_handlers.c:1.180
--- ZendEngine2/zend_object_handlers.c:1.179Fri Nov 10 14:21:13 2006
+++ ZendEngine2/zend_object_handlers.c  Fri Dec  8 16:23:04 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_object_handlers.c,v 1.179 2006/11/10 14:21:13 dmitry Exp $ */
+/* $Id: zend_object_handlers.c,v 1.180 2006/12/08 16:23:04 dmitry Exp $ */
 
 #include zend.h
 #include zend_globals.h
@@ -342,14 +342,16 @@
 
if (rv) {
retval = rv;
-   if ((type == BP_VAR_W || type == BP_VAR_RW  || 
type == BP_VAR_UNSET)  rv-refcount  0) {
-   zval *tmp = rv;
-
-   ALLOC_ZVAL(rv);
-   *rv = *tmp;
-   zval_copy_ctor(rv);
-   rv-is_ref = 0;
-   rv-refcount = 0;
+   if (type == BP_VAR_W || type == BP_VAR_RW  || 
type == BP_VAR_UNSET) {
+   if (rv-refcount  0) {
+   zval *tmp = rv;
+
+   ALLOC_ZVAL(rv);
+   *rv = *tmp;

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/filter/tests 007.phpt 011.phpt

2006-12-08 Thread Ilia Alshanetsky
iliaa   Sat Dec  9 03:17:50 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/filter/tests   007.phpt 011.phpt 
  Log:
  Fixed tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/007.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/filter/tests/007.phpt
diff -u php-src/ext/filter/tests/007.phpt:1.1.2.2 
php-src/ext/filter/tests/007.phpt:1.1.2.3
--- php-src/ext/filter/tests/007.phpt:1.1.2.2   Thu Aug 31 20:17:03 2006
+++ php-src/ext/filter/tests/007.phpt   Sat Dec  9 03:17:49 2006
@@ -1,11 +1,5 @@
 --TEST--
-input_has_variable()
---SKIPIF--
-?php
-/* TODO: Check why we get warnings 2x */
-die(skip);
-die(error mode cannot be changed via -d);
-?
+filter_has_var()
 --GET--
 a=qweabc=ahref/a
 --POST--
@@ -13,25 +7,25 @@
 --FILE--
 ?php
 
-var_dump(input_has_variable(INPUT_GET, a));
-var_dump(input_has_variable(INPUT_GET, abc));
-var_dump(input_has_variable(INPUT_GET, nonex));
-var_dump(input_has_variable(INPUT_GET,  ));
-var_dump(input_has_variable(INPUT_GET, ));
-var_dump(input_has_variable(INPUT_GET, array()));
-
-var_dump(input_has_variable(INPUT_POST, b));
-var_dump(input_has_variable(INPUT_POST, bbc));
-var_dump(input_has_variable(INPUT_POST, nonex));
-var_dump(input_has_variable(INPUT_POST,  ));
-var_dump(input_has_variable(INPUT_POST, ));
-var_dump(input_has_variable(INPUT_POST, array()));
-
-var_dump(input_has_variable(-1, ));
-var_dump(input_has_variable(, ));
-var_dump(input_has_variable(array(), array()));
-var_dump(input_has_variable(array(), ));
-var_dump(input_has_variable(, array()));
+var_dump(filter_has_var(INPUT_GET, a));
+var_dump(filter_has_var(INPUT_GET, abc));
+var_dump(filter_has_var(INPUT_GET, nonex));
+var_dump(filter_has_var(INPUT_GET,  ));
+var_dump(filter_has_var(INPUT_GET, ));
+var_dump(filter_has_var(INPUT_GET, array()));
+
+var_dump(filter_has_var(INPUT_POST, b));
+var_dump(filter_has_var(INPUT_POST, bbc));
+var_dump(filter_has_var(INPUT_POST, nonex));
+var_dump(filter_has_var(INPUT_POST,  ));
+var_dump(filter_has_var(INPUT_POST, ));
+var_dump(filter_has_var(INPUT_POST, array()));
+
+var_dump(filter_has_var(-1, ));
+var_dump(filter_has_var(, ));
+var_dump(filter_has_var(array(), array()));
+var_dump(filter_has_var(array(), ));
+var_dump(filter_has_var(, array()));
 
 echo Done\n;
 ?
@@ -42,27 +36,27 @@
 bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 2 to be string, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 2 to be string, array given in 
%s/007.php on line %d
+bool(false)
 bool(true)
 bool(true)
 bool(false)
 bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 2 to be string, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 2 to be string, array given in 
%s/007.php on line %d
+bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, string given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, string given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, array given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, array given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, string given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, string given in 
%s/007.php on line %d
+bool(false)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/011.phpt?r1=1.2.2.2r2=1.2.2.3diff_format=u
Index: php-src/ext/filter/tests/011.phpt
diff -u php-src/ext/filter/tests/011.phpt:1.2.2.2 
php-src/ext/filter/tests/011.phpt:1.2.2.3
--- php-src/ext/filter/tests/011.phpt:1.2.2.2   Thu Aug 31 20:17:03 2006
+++ php-src/ext/filter/tests/011.phpt   Sat Dec  9 03:17:49 2006
@@ -1,11 +1,5 @@
 --TEST--
 input_get()
---SKIPIF--
-?php
-/* TODO: Check why we get warnings 2x */
-die(skip);
-die(error mode cannot be changed via -d);
-?
 --GET--
 a=btest/bb=http://example.com
 --POST--
@@ -13,20 +7,20 @@
 --FILE--
 ?php
 ini_set('html_errors', false);
-var_dump(input_get(INPUT_GET, a, FILTER_SANITIZE_STRIPPED));
-var_dump(input_get(INPUT_GET, b, FILTER_SANITIZE_URL));
-var_dump(input_get(INPUT_GET, a, FILTER_SANITIZE_SPECIAL_CHARS, 
array(1,2,3,4,5)));
-var_dump(input_get(INPUT_GET, b, FILTER_VALIDATE_FLOAT, new stdClass));
-var_dump(input_get(INPUT_POST, c, FILTER_SANITIZE_STRIPPED, array(5,6,7,8)));
-var_dump(input_get(INPUT_POST, d, FILTER_VALIDATE_FLOAT));
-var_dump(input_get(INPUT_POST, c, FILTER_SANITIZE_SPECIAL_CHARS));
-var_dump(input_get(INPUT_POST, d, FILTER_VALIDATE_INT));
-
-var_dump(input_get(new stdClass, d));
-
-var_dump(input_get(INPUT_POST, c, , ));

[PHP-CVS] cvs: php-src /ext/filter/tests 007.phpt 011.phpt

2006-12-08 Thread Ilia Alshanetsky
iliaa   Sat Dec  9 03:18:21 2006 UTC

  Modified files:  
/php-src/ext/filter/tests   007.phpt 011.phpt 
  Log:
  MFB: Fixed tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/007.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/filter/tests/007.phpt
diff -u php-src/ext/filter/tests/007.phpt:1.3 
php-src/ext/filter/tests/007.phpt:1.4
--- php-src/ext/filter/tests/007.phpt:1.3   Wed Oct  4 11:56:15 2006
+++ php-src/ext/filter/tests/007.phpt   Sat Dec  9 03:18:21 2006
@@ -1,11 +1,5 @@
 --TEST--
-input_has_variable()
---SKIPIF--
-?php
-/* TODO: Check why we get warnings 2x */
-die(skip);
-die(error mode cannot be changed via -d);
-?
+filter_has_var()
 --GET--
 a=qweabc=ahref/a
 --POST--
@@ -13,25 +7,25 @@
 --FILE--
 ?php
 
-var_dump(input_has_variable(INPUT_GET, a));
-var_dump(input_has_variable(INPUT_GET, abc));
-var_dump(input_has_variable(INPUT_GET, nonex));
-var_dump(input_has_variable(INPUT_GET,  ));
-var_dump(input_has_variable(INPUT_GET, ));
-var_dump(input_has_variable(INPUT_GET, array()));
-
-var_dump(input_has_variable(INPUT_POST, b));
-var_dump(input_has_variable(INPUT_POST, bbc));
-var_dump(input_has_variable(INPUT_POST, nonex));
-var_dump(input_has_variable(INPUT_POST,  ));
-var_dump(input_has_variable(INPUT_POST, ));
-var_dump(input_has_variable(INPUT_POST, array()));
-
-var_dump(input_has_variable(-1, ));
-var_dump(input_has_variable(, ));
-var_dump(input_has_variable(array(), array()));
-var_dump(input_has_variable(array(), ));
-var_dump(input_has_variable(, array()));
+var_dump(filter_has_var(INPUT_GET, a));
+var_dump(filter_has_var(INPUT_GET, abc));
+var_dump(filter_has_var(INPUT_GET, nonex));
+var_dump(filter_has_var(INPUT_GET,  ));
+var_dump(filter_has_var(INPUT_GET, ));
+var_dump(filter_has_var(INPUT_GET, array()));
+
+var_dump(filter_has_var(INPUT_POST, b));
+var_dump(filter_has_var(INPUT_POST, bbc));
+var_dump(filter_has_var(INPUT_POST, nonex));
+var_dump(filter_has_var(INPUT_POST,  ));
+var_dump(filter_has_var(INPUT_POST, ));
+var_dump(filter_has_var(INPUT_POST, array()));
+
+var_dump(filter_has_var(-1, ));
+var_dump(filter_has_var(, ));
+var_dump(filter_has_var(array(), array()));
+var_dump(filter_has_var(array(), ));
+var_dump(filter_has_var(, array()));
 
 echo Done\n;
 ?
@@ -42,27 +36,27 @@
 bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 2 to be string, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 2 to be string, array given in 
%s/007.php on line %d
+bool(false)
 bool(true)
 bool(true)
 bool(false)
 bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 2 to be string, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 2 to be string, array given in 
%s/007.php on line %d
+bool(false)
 bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, string given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, string given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, array given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, array given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, array given in 
%s/007.php on line %d
+bool(false)
 
-Warning: input_has_variable() expects parameter 1 to be long, string given in 
%s on line %d
-NULL
+Warning: filter_has_var() expects parameter 1 to be long, string given in 
%s/007.php on line %d
+bool(false)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/011.phpt?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/filter/tests/011.phpt
diff -u php-src/ext/filter/tests/011.phpt:1.4 
php-src/ext/filter/tests/011.phpt:1.5
--- php-src/ext/filter/tests/011.phpt:1.4   Wed Oct  4 11:56:15 2006
+++ php-src/ext/filter/tests/011.phpt   Sat Dec  9 03:18:21 2006
@@ -1,11 +1,5 @@
 --TEST--
 input_get()
---SKIPIF--
-?php
-/* TODO: Check why we get warnings 2x */
-die(skip);
-die(error mode cannot be changed via -d);
-?
 --GET--
 a=btest/bb=http://example.com
 --POST--
@@ -13,20 +7,20 @@
 --FILE--
 ?php
 ini_set('html_errors', false);
-var_dump(input_get(INPUT_GET, a, FILTER_SANITIZE_STRIPPED));
-var_dump(input_get(INPUT_GET, b, FILTER_SANITIZE_URL));
-var_dump(input_get(INPUT_GET, a, FILTER_SANITIZE_SPECIAL_CHARS, 
array(1,2,3,4,5)));
-var_dump(input_get(INPUT_GET, b, FILTER_VALIDATE_FLOAT, new stdClass));
-var_dump(input_get(INPUT_POST, c, FILTER_SANITIZE_STRIPPED, array(5,6,7,8)));
-var_dump(input_get(INPUT_POST, d, FILTER_VALIDATE_FLOAT));
-var_dump(input_get(INPUT_POST, c, FILTER_SANITIZE_SPECIAL_CHARS));
-var_dump(input_get(INPUT_POST, d, FILTER_VALIDATE_INT));
-
-var_dump(input_get(new stdClass, d));
-
-var_dump(input_get(INPUT_POST, c, , ));
-var_dump(input_get(, , , , ));
-var_dump(input_get(0, 0,