kevinhtj Posted May 7, 2013 Share Posted May 7, 2013 Getting the following error after doing a test relocation of a website to a new shared server. Fatal error! Your request can not be executed! Fatal error: Cannot use object of type PEAR_Error as array in /data/19/3/11/99/3011262/user/3343466/htdocs/HTJ/system/ext/I18N/LangData.php on line 66 checked the LangData file and here's the 'offending' code, from line 62-72 public static function createLangDataFromServer($lang_data) { $langData = new LangData(); $langData->setID($lang_data['lang_id']); $langData->setCaption($lang_data['name']); $langData->setMeta($lang_data['meta']); $langData->setErrorText($lang_data['error_text']); return $langData; } Stumped as to what might be causing this. Keep in mind he site was originally built on a Smarty php basis. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted May 7, 2013 Share Posted May 7, 2013 you can no longer reference object properties using array syntax. you must either correctly reference the property - $lang_data->lang_id or you must cast the object to an array. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.