#39646 [Opn->Bgs]: preg_match not working over https with delcared array
| From: | tony2001@php.net | Date: | Mon, 27 Nov 2006 17:21:47 +0000 |
| Subject: | #39646 [Opn->Bgs]: preg_match not working over https with delcared array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-105516@lists.php.net to get a copy of this message | ||
ID: 39646
Updated by: tony2001@php.net
Reported By: jeremy_lupoli at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: *Regular Expressions
Operating System: Windows XP
PHP Version: 5.2.0
New Comment:
preg_match() knows nothing about HTTP or HTTPS, there must be something
else, that affect this behaviour (different data, for example).
Previous Comments:
------------------------------------------------------------------------
[2006-11-27 16:47:46] jeremy_lupoli at hotmail dot com
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 this bug report at http://bugs.php.net/?id=39646&edit=1