bighippo Posted September 21, 2007 Share Posted September 21, 2007 hi! please help me. im USING PEAR serialize class. when ever i pass an integer value in array this error massages comes out :: Fatal error: Cannot use object of type PEAR_Error as array i need the integer value for mathematical operations. ive already used typecast,intval,to_number.. etc... it didnt work. any suggestion / solution. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/70125-fatal-error-cannot-use-object-of-type-pear_error-as-array/ Share on other sites More sharing options...
d22552000 Posted September 21, 2007 Share Posted September 21, 2007 IDK anything about what you are trying to do but I cna explain the error Your PHP is using PEAR *unapcked* and apparently PEAR_Error is not an array. For some reason you are trying to use it as an array, but frankly its not one. This can also happen if the script tries to use it as an array if an error happens in PEAR. Quote Link to comment https://forums.phpfreaks.com/topic/70125-fatal-error-cannot-use-object-of-type-pear_error-as-array/#findComment-352186 Share on other sites More sharing options...
bighippo Posted September 21, 2007 Author Share Posted September 21, 2007 IDK anything about what you are trying to do but I cna explain the error Your PHP is using PEAR *unapcked* and apparently PEAR_Error is not an array. For some reason you are trying to use it as an array, but frankly its not one. This can also happen if the script tries to use it as an array if an error happens in PEAR. im trying to serialized the posted data. then this serialized data are sent to my api which will check/process it. during the process I need the integer data for my validation check in parameter. if paramters are correct it will return a boolean(true). i dont fully understand pear. im not using PEAR:ERROR as an array. Quote Link to comment https://forums.phpfreaks.com/topic/70125-fatal-error-cannot-use-object-of-type-pear_error-as-array/#findComment-352194 Share on other sites More sharing options...
d22552000 Posted September 21, 2007 Share Posted September 21, 2007 then this means an error ocured in pearn and php isnt setup to undesrtand what to do with it. uh.. I dont know what or how PEAR works, and I don't (WON'T) pretend to. Quote Link to comment https://forums.phpfreaks.com/topic/70125-fatal-error-cannot-use-object-of-type-pear_error-as-array/#findComment-352195 Share on other sites More sharing options...
bighippo Posted September 21, 2007 Author Share Posted September 21, 2007 then this means an error ocured in pearn and php isnt setup to undesrtand what to do with it. do you mean PEAR is not properly setup? anyone who encountered the same problem? Quote Link to comment https://forums.phpfreaks.com/topic/70125-fatal-error-cannot-use-object-of-type-pear_error-as-array/#findComment-352201 Share on other sites More sharing options...
bighippo Posted September 21, 2007 Author Share Posted September 21, 2007 i dont whats the problem in this. all i know is that whenever change data type to integer this error comes out. Quote Link to comment https://forums.phpfreaks.com/topic/70125-fatal-error-cannot-use-object-of-type-pear_error-as-array/#findComment-352209 Share on other sites More sharing options...
d22552000 Posted September 22, 2007 Share Posted September 22, 2007 why wouldy ou need to change the data type?> Transfrer it to a non pear variable $var=$_SERVER['PEAR']['var']; Quote Link to comment https://forums.phpfreaks.com/topic/70125-fatal-error-cannot-use-object-of-type-pear_error-as-array/#findComment-352816 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.