vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   PHP5 problem (https://vborg.vbsupport.ru/showthread.php?t=322787)

SilverBoy 06-07-2016 02:03 AM

PHP5 problem
 
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:
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

Quote:

Originally Posted by nmohapata123 (Post 2571721)
Replace preg_replace() e modifier with preg_replace_callback

how? could you write the function for me?

--------------- Added [DATE]1465317190[/DATE] at [TIME]1465317190[/TIME] ---------------

Quote:

Originally Posted by RichieBoy67 (Post 2571730)
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

Quote:

Originally Posted by SilverBoy (Post 2571719)
Hi

I updated my server PHP version to PHP5...

from what?

Mattwhf 07-27-2016 09:39 AM

Quote:

Originally Posted by Paul M (Post 2571745)
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 ?


All times are GMT. The time now is 04:55 PM.

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.01039 seconds
  • Memory Usage 1,733KB
  • 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_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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