Mantis - Quercus
Viewing Issue Advanced Details
3198 minor always 12-28-08 10:05 12-28-08 15:13
koreth  
ferg  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003198: Multiple ^ subexpressions cause NPE in preg_match
<?php
preg_match("/^x|^y/", 'foobar');

Causes NPE:

[10:04:25.041] {http--8080-68} java.lang.NullPointerException
[10:04:25.041] {http--8080-68} at com.caucho.quercus.lib.regexp.RegexpNode$Or.isAnchorBegin(RegexpNode.java:1812)
[10:04:25.041] {http--8080-68} at com.caucho.quercus.lib.regexp.RegexpNode$Or.isAnchorBegin(RegexpNode.java:1812)
[10:04:25.041] {http--8080-68} at com.caucho.quercus.lib.regexp.Regexp.compile(Regexp.java:201)
[10:04:25.041] {http--8080-68} at com.caucho.quercus.lib.regexp.Regexp.<init>(Regexp.java:150)
[10:04:25.041] {http--8080-68} at com.caucho.quercus.lib.regexp.CauchoRegexpModule.getRegexp(CauchoRegexpModule.java:1401)
[10:04:25.041] {http--8080-68} at com.caucho.quercus.lib.regexp.CauchoRegexpModule.preg_match(CauchoRegexpModule.java:230)
[10:04:25.041] {http--8080-68} at com.caucho.quercus.lib.regexp.RegexpModule.preg_match(RegexpModule.java:119)

Notes
(0003677)
ferg   
12-28-08 15:13   
php/4e84