Segmentation Fault calling Method
Posted: Tue Sep 30, 2014 9:31 pm
I am getting a segmentation fault when I call a method of an object. The method is actually implemented in the base class, and I call the same method in a lot of different places in my site, but when I call it in this particular case I get a segmentation fault.
If I place an exit command immediately prior to calling postUpdate I see:
If I place an exit command in the very first line of the method postUpdate PHP gets a segmentation fault. The method postUpdate just updates the contents of the object based upon $_POST. There is no recursion. The fault happens immediately. What could go wrong in between calling the method and the very first line of code in the method that would cause a segmentation fault? Running PHP Version 5.5.9 on Apache 2.4.7.
Code: Select all
print "<p>\$picture=" . print_r($picture, true) . "</p>\n";
// apply any changes passed in parameters
if (method_exists($picture, 'postUpdate'))
print "<p>object has a postUpdate method</p>\n";
else
print "<p>object does not have a postUpdate method</p>\n";
$picture->postUpdate(true);Code: Select all
$picture=LegacyPicture Object ( [row:protected] => Array ( [idbr] => 0 [idir] => 20553 [idtype] => 0 [pictype] => 0 [picorder] => 0 [picname] => [picnameurl] => [idbppic] => 1 [piccaption] => [picd] => [picsd] => [picdate] => [picdesc] => [picprint] => 0 [picsoundname] => [picsoundnameurl] => [idbpsound] => 0 [used] => 0 [picpref] => 1 [filingref] => ) [changed:protected] => Array ( ) [table:Record:private] => tblBR [prime:Record:private] => idbr [needInsert:protected] => 1 )
object has a postUpdate method.