ID:               48938
 Updated by:       scott...@php.net
 Reported By:      alexis at m2osw dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         PCRE related
 Operating System: Linux
 PHP Version:      5.2.10
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Check out preg_last_error(), you've reached a limit we set in PCRE to
prevent segfaults due to inefficient regular expressions.


Previous Comments:
------------------------------------------------------------------------

[2009-07-16 04:50:14] alexis at m2osw dot com

Description:
------------
I have a pregex that starts looks like this:

/(?:<p.*?>)?\[.../s

(The last ... is to be interpreted as an ellipsis)

Removing the /s or the <p> tag before the \[ fixes the problem.
Otherwise the preg_replace_callback() returns an empty string and never
calls the callback. This is the case with several pages of data we have,
although it is not easy for me to determine what triggers the problem.

P.S. If the callback does not exist, the function has a shortcut and
the input is immediately returned as is.

Reproduce code:
---------------
1740 lines of code found as an attachment to that page:

http://linux.m2osw.com/pcre_php_s_modifier_bug

The main reason for the length is the HTML code, the failing code is
just 1 line at the bottom.


Expected result:
----------------
($s == preg_replace_callback(...)) === TRUE

since the callback should not be called with that HTML.

Actual result:
--------------
preg_replace_callback() returns NULL


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48938&edit=1

Reply via email to