|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-10-19 08:39 UTC] dl4gbe at gmail dot com
Description: ------------ I used to have functions (methods) in a class named "form" (not static). Later, I changed the design and moved the methods into a static class. named "xmlparser". In one case I forgot to change my code and still called the old instance method. the old call was $a_form->createTable($l_formnode); it should have been: xmlparser::createTable($a_form,$l_formnode); Like said: I moved function createTable into the static class xmlparser. The function was called from another static function located in xmlparser which had a valid form object instanized and a valid xml node as a second parameter The result? I did not get a "function not found in class" or something like this error in the log file. No, I run into a crazy segmentation fault (11) error. I can't debug crazy segmentation fault errors(11) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 05:00:01 2025 UTC |
I can't provide lines of script. The error seems not to occure in simple scripts. I guess it only happens in more complicated structures that an segmentation fault happens in case a method of a class does not exist. I will try to build a debug version on my system. But that needs time. Just now, I am not able to compile php on the affected system. I do not know if this helps: public static function getFormHtml($a_row,$a_form) { $l_return = ""; $l_return .= "<tr class='" . $a_form->getCssFormTr() . "'>" . utils::getLineEnd(); $l_return .= "<td class='" . $a_form->getCssFormTd() . "'>" . utils::getLineEnd(); $l_return .= "<table class='" . $a_form->getCssFormTable() . "' width='100%'"; $l_return .= " id='" . $a_form->getControlName() . "_table_form_main" . "'>" . utils::getLineEnd(); utils::addToDebugLog("getFormHtml (Start)"); if ($a_form->getTabCount() == 0) { utils::addToDebugLog("getFormHtml (1)"); $l_return .= "<tr class='" . $a_form->getCssTrForm() . "'>" . utils::getLineEnd(); $l_return .= "<td class='" . $a_form->getCssTdForm() . "'>" . utils::getLineEnd(); utils::getLineEnd(); // this line causes php to crash $l_return .= $a_form->getTabHtml(0,$a_row); // because I moved getTabHtml to htmlrender class as static // and there is no function with this name in $a_form anymore // This is the line which I planned to call but forgot to change :-( //$l_return .= htmlrender::getTabHtml(0,$a_row,$a_form); // what I know is, using this line instead of the line above // my program works and is not causing a segmentation error anymore. $l_return .= "</td>" . utils::getLineEnd(); $l_return .= "</tr>" . utils::getLineEnd(); }