PDA

View Full Version : PHP5 problem


SilverBoy
06-07-2016, 02:03 AM
Hi

I updated my server PHP version to PHP5, and get error in one of the addons regarding to preg_replace function, could you please to recode the function using preg_replace_callback function?

The old code is
PHP Code:
return preg_replace('#\[quote(=("|"|\'|)??.*\\2)?\](((?>[^\[]*?|(?R)|.))*)\[/quote\]#siUe',
"process_quote_removal1('\\3', \$display['highlight'])", $pagetext);
Thanks in advance.

nmohapata123
06-07-2016, 05:23 AM
Replace preg_replace() e modifier with preg_replace_callback

RichieBoy67
06-07-2016, 01:58 PM
What version of Vbulletin are you using?

SilverBoy
06-07-2016, 02:32 PM
Replace preg_replace() e modifier with preg_replace_callback

how? could you write the function for me?

--------------- Added 1465317190 at 1465317190 ---------------

What version of Vbulletin are you using?

vb4.2.3

Paul M
06-07-2016, 04:49 PM
You need to contact the author of the add-on, and/or post in its thread.

SilverBoy
06-07-2016, 08:37 PM
I want just to replace the function preg_replace with preg_replace_callback function.

nhawk
06-08-2016, 09:56 AM
What you are most likely getting is a warning similar to this...
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

That warning is simply telling you that preg_replace will not be supported in future versions of PHP.

That is a WARNING, not an error. You can safely turn off deprecated warnings using something like this as the first line of the code...
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

illusioN-tEk
07-26-2016, 05:50 PM
change php version to 5.4 rather then 5.5 try that

DivisionByZero
07-26-2016, 11:22 PM
Hi

I updated my server PHP version to PHP5...from what?

Mattwhf
07-27-2016, 09:39 AM
You need to contact the author of the add-on, and/or post in its thread.

I will go with this solution, contact to the author of addon will help you solve the problem and fix your codes.

Paul M
07-27-2016, 02:13 PM
Our codes ?? To who are you referring ?