From: jeremy_lupoli at hotmail dot com Operating system: Windows XP PHP version: 5.2.0 PHP Bug Type: *Regular Expressions Bug description: preg_match not working over https with delcared array
Description: ------------ Very oddly, preg_match does not seem to work in some cases over https:// while it works fine over http:// See: https://208.97.159.12/test.php (doesn't work) vs. http://208.97.159.12/test.php (does work). Only occurs when array is declared implicitely in function, e.g. preg_match($pat, $class, $mat=array()) does not work on https:// while preg_match($pat, $class, $mat) works on both https:// and http:// Reproduce code: --------------- <? $class="C11"; ?> <? $pat = '/^(\D+)(\d+)$/'; if (!preg_match($pat, $class, $mat=array())) { $notdigits=''; $digits = ''; } else { print_r($mat); } ?> Expected result: ---------------- Array ( [0] => C11 [1] => C [2] => 11 ) Actual result: -------------- Array ( ) -- Edit bug report at http://bugs.php.net/?id=39646&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39646&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39646&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39646&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39646&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39646&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39646&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39646&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39646&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39646&r=support Expected behavior: http://bugs.php.net/fix.php?id=39646&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39646&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39646&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39646&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39646&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39646&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39646&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39646&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39646&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39646&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39646&r=mysqlcfg