Log in

View Full Version : Cannot use string offset as an array


Amenadiel
07-06-2008, 04:46 AM
I keep getting this error:
Cannot use string offset as an array in /var/www/html/foro/index.php(561) : eval()'d code on line 15

But I can't find nothing wrong with index.php:

<?php
/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 3.7.0 - Licence Number xxxxxx
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000-2008 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| ################################################## ################## ||
\*================================================ ======================*/




// ####################### SET PHP ENVIRONMENT ###########################
//error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'index');
define('CSRF_PROTECTION', true);
define('CSRF_SKIP_LIST', '');
define('THIS_SCRIPT', 'index');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array('holiday');

// get special data templates from the datastore
$specialtemplates = array(
'userstats',
'birthdaycache',
'maxloggedin',
'iconcache',
'eventcache',
'mailqueue'
);

// pre-cache templates used by all actions
$globaltemplates = array(
'ad_forumhome_afterforums',
'FORUMHOME',
'forumhome_event',
'forumhome_forumbit_level1_nopost',
'forumhome_forumbit_level1_post',
'forumhome_forumbit_level2_nopost',
'forumhome_forumbit_level2_post',
'forumhome_lastpostby',
'forumhome_loggedinuser',
'forumhome_moderator',
'forumhome_subforumbit_nopost',
'forumhome_subforumbit_post',
'forumhome_subforumseparator_nopost',
'forumhome_subforumseparator_post',
'forumhome_markread_script',
'forumhome_birthdaybit'
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_bigthree.php');
require_once(DIR . '/includes/functions_forumlist.php');


I'm running PHP 5.1.6, I believe that's pretty up to date isn't it? ?What do you think?

Dismounted
07-06-2008, 06:04 AM
It's caused by a modification. Disable each modification until you find the one that causes it.

Opserty
07-06-2008, 10:47 AM
Cannot use string offset as an array in /var/www/html/foro/index.php(561) : eval()'d code on line 15

Is the important bit ;) (eval()'d code refers to Plugins or Templates, the actual PHP line is Line 561 of index.php)

Amenadiel
07-06-2008, 11:27 PM
hmm, I believe I found it, and it's in mod graveyard now omg omg