vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   PHP error help (https://vborg.vbsupport.ru/showthread.php?t=327329)

z3r0 06-22-2019 08:32 AM

PHP error help
 
I've got a couple of PHP warnings showing up in my error logs, can any of you guys advise me of a fix?

Error
Code:

PHP Warning:  explode() expects parameter 2 to be string, array given in w:\xxxxx\xxxxx\file.php on line 328
PHP Warning:  array_merge(): Argument #1 is not an array in w:\xxxxx\xxxxx\file.php on line 329


Lines 328 & 329
Code:

$tomerge = explode(",", str_replace(" ","",$templates));
$cacheadd = array_merge($tomerge, $cacheadd);



If it helps this is the full condition that the code is contained in.
Code:

if ($templates)
{
$tomerge = array ();
$tomerge = explode(",", str_replace(" ","",$templates));
$cacheadd = array_merge($tomerge, $cacheadd);
}


romaine 06-26-2019 10:35 PM

Are you using vB 4.2.5?

If you make any changes on vB cores then can make other functions not work, for these commands, trying to find same php functions that work with PHP 7.


All times are GMT. The time now is 03:48 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.00985 seconds
  • Memory Usage 1,707KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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