whoshotyavideo / vqmod

Automatically exported from code.google.com/p/vqmod
0 stars 0 forks source link

Error - preg_replace(): The /e modifier is deprecated on vqmod.php line 329 #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
NOTE THAT THIS IS FOR VQMOD ENGINE ERRORS ONLY. FOR GENERAL ERRORS FROM
MODIFICATIONS CONTACT YOUR DEVELOPER

What steps will reproduce the problem?
1. Installed vqmod as usual
2. Changed file permissions as instructed in the installation manual

What is the expected output? What do you see instead?

Normal functioning of vqmod. 

Right we are having this error: 

Unknown: preg_replace(): The /e modifier is deprecated, use 
preg_replace_callback instead in 
/home/bedrijf/domains/bestemuurstickers.nl/public_html/vqmod/vqmod.php on line 
329

vQmod Version: 2.1.7 - 2.3.2
Server Operating System: Linux

Please provide any additional information below.

The server is using PHP 5.5

After searching the error on Google we landed into this PHP link: 
http://php.net/manual/en/reference.pcre.pattern.modifiers.php

Many thanks

Original issue reported on code.google.com by peterhut...@gmail.com on 23 Apr 2013 at 6:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This regex is coming directly from the vqmod.php file on line 329. Are we to 
assume that vqmod is no longer compatible with PHP 5.5+, without modifying the 
included vqmod.php file? 

Original comment by falcon...@live.com on 24 Jul 2013 at 7:22

GoogleCodeExporter commented 9 years ago
The error is coming from that file because that file is the one that processes 
all of the vQmods. vQmod is compatible with PHP 5.X without issue

Original comment by DJG6...@gmail.com on 24 Jul 2013 at 9:56

GoogleCodeExporter commented 9 years ago
I appreciate your prompt reply but respectfully disagree with your statement. 
Perhaps I may be missing something, but in order for me to get vqmod v2.3.2 
working correctly with PHP 5.5 (e Pattern Modifier depreciation) I had to 
modify line 329 of vqmod.php as follows:

From This:
$modFilePath = preg_replace('/([^*]+)/e', 'preg_quote("$1", "~")', 
$modFilePath);

To This:
$modFilePath = preg_replace_callback('/([^*]+)/', function ($m) { return 
preg_quote($m[1], "~"); }, $modFilePath);

Just trying to help the users who are running into this situation. Thanks again!

Original comment by falcon...@live.com on 24 Jul 2013 at 1:34

GoogleCodeExporter commented 9 years ago
I stand corrected. Been a while since I've looked at the code and was going 
from memory. I'll get that put into the next version's fix

Original comment by DJG6...@gmail.com on 24 Jul 2013 at 1:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by DJG6...@gmail.com on 24 Jul 2013 at 1:53

GoogleCodeExporter commented 9 years ago
Fixed in upcoming version 2.4.0 - used a coded method instead of the anonymous 
function to allow backward php compatibility before 5.3.0

Original comment by DJG6...@gmail.com on 26 Jul 2013 at 6:40

GoogleCodeExporter commented 9 years ago
Thanks for the fix.

Original comment by peterhut...@gmail.com on 5 Aug 2013 at 6:23