SMF Development > Fixed or Bogus Bugs

XML functions broken for PHP 5.3.10

<< < (2/3) > >>

butchs:
Hey I myself and happy to see a late monkey than to see no monkey at all.  Thank you for showing up!    :D

reklipz:

--- Quote from: Spuds on March 29, 2012, 08:29:13 PM ---Welcome to SMF

It looks to be more of a specific PCRE library issue than a specific system issue ... if php is compiled using the latest external version of the PCRE library it looks to cause this warning error.

It will be fixed in SMF 2.1, I'm not sure if there will be a maintenance release (2.0.3) before then or if this fix would make it in to that TBH.

If your looking for timelines, well you came to the wrong place :P ... things happen as they can around here, never sooner.  We are just happy that people are willing to volunteer their time to do all this for free :)

--- End quote ---

Understood, :).  No complaints here.  I was just interested in how things work around here.  Everything is working fine on my end now, so I'm in no hurry.  Thanks for the fix!

N. N.:
Just to note, I am still to look at this closely, afaics however we're including the fix for this in 2.0.3. Thank you for the reports and investigation! :)

Kryten15:
I have the same issue in terms of getting that same error when trying to use the quick quote, etc. I have tried the above fix but it did not work. Instead I got an error about an unexpected return on that line.

I have a moderate knowledge of general coding but I'm far from being an expert, and I have limited knowledge of php. Is there something I am missing that could help fix this issue?

If the fix will be included in 2.0.3 is there any approximate timeframe for that, or is it best to seek a fix before 2.0.3 is released?

EDIT: Apologies. I did a copy and paste job on the fix suggested by Spuds above but it inserted a second return statement which I didn't pick up on. The fix seems to work for me now.

4LP3RUZ1:

--- Quote from: Spuds on March 24, 2012, 07:54:55 PM ---Well that stinks ! ... looks like its a change in the PCRE engine starting at rev 8.3, where it will toss that warning if you specify the surrogate range D800–DFFF.  These are not technically characters, and are invalid in UTF-8 (strict) ... which is why they were stripped ... so looks like preg now complains  :-X

High Surrogates (D800–DB7F)
High Private Use Surrogates (DB80–DBFF)
Low Surrogates (DC00–DFFF)

Do the following replace and see if it fixes the problem on your setup, I don't have a setup to test it on ATM.


--- Code: (find) ---preg_replace('~[\x00-\x08\x0B\x0C\x0E-\x19' . ($context['utf8'] ? (@version_compare(PHP_VERSION, '4.3.3') != -1 ? '\x{D800}-\x{DFFF}\x{FFFE}\x{FFFF}' : "\xED\xA0\x80-\xED\xBF\xBF\xEF\xBF\xBE\xEF\xBF\xBF") : '') . ']~' . ($context['utf8'] ? 'u' : ''), '', $string)
--- End code ---


--- Code: (replace) ---return preg_replace('~[\x00-\x08\x0B\x0C\x0E-\x19' . ($context['utf8'] ? '\x{FFFE}\x{FFFF}' : '') . ']~' . ($context['utf8'] ? 'u' : ''), '', $string);

--- End code ---

--- End quote ---

Old topic I know, but after a plesk update a few days ago (I am assuming, because I changed nothing else...) I ran into this same problem and the above took care of it. Thanks!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version