The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
IMG to URL convert
Hello,
I'm using this code in class_bbcode.php line 1866 Code:
// Start IMG to URL BBCode Converter if ($this->contains_bbcode_img_tags($message)) { $message = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $message); } // End IMG to URL BBCode Converter I think something is old in this code,because this is generate error.log like that PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /includes/class_bbcode.php on line 1866 But this code is working without any problem. Only generate this error.log My php version is 5.6.x and vB 4.2.x Regards |
#2
|
|||
|
|||
It is php error. Just remove e from preg_replace.
Updated code will be like this: Code:
// Start IMG to URL BBCode Converter if ($this->contains_bbcode_img_tags($message)) { $message = preg_replace('#\[img\]\s*(https?://([^<>*"]+|[a-z0-9/\\._\- !]+))\[/img\]#iU', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $message); } // End IMG to URL BBCode Converter |
#3
|
|||
|
|||
It is not OK This error occured in qoute and not work
Code:
$this->handle_bbcode_url(str_replace('\"', '"', 'https://images2.imgbox.com/5f/28/NEN92qNM_o.png'), '') Quote:
|
#4
|
|||
|
|||
I think
PHP Code:
|
#5
|
|||
|
|||
Thanks so much :up: This code is perfectly working and didn't create any error.log
Many thanks again Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|