View Single Post
  #188  
Old 22 Jul 2019, 16:46
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Real name: CM
How to fix preg_replace() errors in PHP 5.6 + 7.x for DJ AME's 2.5/2.7 :

- This fix is for the preg_replace Errors (Error 1) in ame_bbcode.php reported by user Mandushi above.
- In my case I encountered the 2nd Error (Error 2) seen below after upgrading to vBulletin 3.8.1.1 and PHP 5.6+

Error 1: In vBulletin 3.8.x versions using PHP 5.6 +:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Error 2: In vBulletin 3.8.1.1, when using PHP 5.6 +:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Here is the fix:

Thankfully I had some help to complete this fix long time a go on StackOverflow (Credits Barmar). So the methods below below will fix all of the preg_replace deprecated errors in ame_bbcode.php file.

1. Edit the > ame_bbcode.php and find this line in function named (&fetch_full_ameinfo):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2. Then replace the COMPLETE section with this instead:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

3. Next find the line below in function named function ame_process_bbcode:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

4. And replace it with this instead:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And that's pretty much it. Now you should no longer experince the preg_replace errors in ame_bbcode.php

Additional Fix for line 324 in ame_bbcode.php

1. The line seen below at line 324 will also show up as a Deprecated Error:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2. To fix it, just replace it with the line below as well:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Please leave a feed back for others to know if you were able to make it work on your end. Thank you.

Regards China.
__________________
I am having a little break from vB Developing. I am trying to finish my PHP and MYSQL courses for now. I will answer all my PM's if anyone needed help for my products, but only when I can be online on vB.org. Its great to see new and old developers keeping vB.org alive! Thank you all for your support!CM

Last edited by ChiNa; 22 Jul 2019 at 18:03.
Reply With Quote