Re: [PHP] How to check if an object exists
Derrick, Derrick Shoemake wrote: It appears that the error I was getting wasn't really related to my problem. I'm getting a error in httpd-error.log httpd in free(): error: junk pointer, too high to make sense [Tue Jan 24 17:11:32 2006] [notice] child pid 22665 exit signal Abort trap (6) Is there any way to track down where the code is failing? It's not creating any dump file that I can see. I don't mind digging into this to either report a bug to php.net, apache.org or even just fix the code myself and submit a patch to someone, but I'm a little new to the php and apache working together. This might be related to PHP, but I would start out by asking around the Apache community. David -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to check if an object exists
I have sort of a silly question. I'm running SugarCRM and trying to track down an error. I dug up the error from the httpd error log and then started checking into the code myself. The error appears to be a code issue, but since I don't know how to properly check to see if an object is valid, I'm not really sure what the correct coding should be. The system is a FreeBSD 5.3 box with Apache 2.0.55 and PHP 5.1.2. Everything appears to run alright except when sending an email with SugarCRM then a entry in the httpd error log appears PHP Notice: Object of class UploadFile could not be converted to int in sugar/modules/Emails/Save.php line 116 The code block looks like this in save.php $upload_file = new UploadFile('email_attachment'.$i); if ($upload_file == -1) { - Line 116 continue; } Does anyone know if this is the proper way to check for an Objects existence and where I can find more information on doing so? Thanks, Derrick Shoemake
Re: [PHP] How to check if an object exists
Derrick, Derrick Shoemake wrote: Does anyone know if this is the proper way to check for an Objects existence and where I can find more information on doing so? php.net/is_object php.net/instance_of David -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to check if an object exists
Thanks David, I changed some code and it apparently didn't give the error anymore but didn't really solve my problem. It appears that the error I was getting wasn't really related to my problem. I'm getting a error in httpd-error.log httpd in free(): error: junk pointer, too high to make sense [Tue Jan 24 17:11:32 2006] [notice] child pid 22665 exit signal Abort trap (6) Is there any way to track down where the code is failing? It's not creating any dump file that I can see. I don't mind digging into this to either report a bug to php.net, apache.org or even just fix the code myself and submit a patch to someone, but I'm a little new to the php and apache working together. Thanks, -Derrick On Jan 24, 2006, at 4:40 PM, David Grant wrote: Derrick, Derrick Shoemake wrote: Does anyone know if this is the proper way to check for an Objects existence and where I can find more information on doing so? php.net/is_object php.net/instance_of David -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php