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. Link to comment https://forums.phpfreaks.com/topic/277751-fatal-error-cannot-use-object-of-type-pear_error/ 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. Link to comment https://forums.phpfreaks.com/topic/277751-fatal-error-cannot-use-object-of-type-pear_error/#findComment-1428895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.