Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0RC6

Bug #15924 Warning: split() [function.split]: Invalid preceding regular expression
Submitted: 2009-02-21 02:11 UTC
From: lgalarra Assigned: hugoki
Status: Feedback Package: Structures_BibTex
PHP Version: 5.2.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2009-02-21 02:11 UTC] lgalarra (Luis Galárraga)
Description: ------------ Dear developers: My project (http://joomla-research.com) is using this library to parse sets of Bibtex entries, however a user reported a really strange bug in which the parse method could not retrieve the type of entry ('entryType' property in the result array). By debugging the code I found the following problem in line 423 : split() [function.split]: Invalid preceding regular expression in ... line 423 which produces variable $arr to be empty. I check PHP documentation for function split and found that this takes a pattern as first parameter which made me realize, regexp special characters should be escaped. The mentioned line says: $arr = split('{', $entry); I changed it to: $arr = split('\{', $entry); and the bug was gone. I have to add that my user is using PHP 5.2.6 (Why does it not appear in the list?) It is the first time something similar happen. Furthermore, this change did not affect other installations. Test script: --------------- Expected result: ---------------- Actual result: --------------

Comments

 [2009-03-02 03:38 UTC] doconnor (Daniel O'Connor)
-Assigned To: +Assigned To: hugoki
 [2010-08-20 02:31 UTC] olleolleolle (Olle Jonsson)
 [2012-01-17 20:06 UTC] doconnor (Daniel O'Connor)
-Status: Assigned +Status: Feedback
Thank you for taking the time to report a problem with the package. This problem may have been already fixed by a previous change that is in the SVN of the package. Please checking out the SVN repository of this package and upgrade svn checkout svn.php.net/repository/pear/packages/Structures_BibTex/trunk pear upgrade package2.xml or pear upgrade package.xml If you are able to reproduce the bug with the latest SVN, please change the status back to "Open". Again, thank you for your continued support of PEAR. Have got OlleOlleOlle's patch applied for this anyway - can you verify if it happens with explode() now in use?