vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   BB Code PHP Error (https://vborg.vbsupport.ru/showthread.php?t=325093)

Bulent Tekcan 05-16-2017 12:31 PM

BB Code PHP Error
 
Hello

I'm using this code in class_bbcode.php. This is for IMG to URL convert

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

But I get this error from php

PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/includes/class_bbcode.php on line 1866

Any idea what is the problem in that code ? Before my php is old and I never see any problem.

Regards

MarkFL 05-16-2017 12:41 PM

The best thing to do here is to upgrade your vB to a version that is compatible with the PHP you are using now.

Bulent Tekcan 05-16-2017 12:46 PM

But my vB also compatible my php version. Only that code seems to be old. I think preg_replace changed in php 5.6. But how can I correct that code I don't know.

Maybe preg_replace change to preg_replace_callback ?

MarkFL 05-16-2017 12:47 PM

What are your vB and PHP version numbers?


All times are GMT. The time now is 03:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00920 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete