[PHP-DEV] Bug #10459: can't find function then crush From: akul <email protected>
Date: 04/23/01

From: akul <email protected>
Operating system: Windows 98 SE
PHP version: 4.0.4pl1
PHP Bug Type: Reproduceable crash
Bug description: can't find function then crush

Configuration: see bug #9819

Output:

X-Powered-By: PHP/4.0.4pl1
Content-type: text/html

<HTML><BODY>
<br>
<b>Fatal error</b>: Call to undefined function: sorted_keys() in <b>../action.
class.php</b> on line <b>52</b><br>

then Windows says (language is russian):

Программа PHP вызвала сбой при обращении к странице памяти
в модуле <нет данных> по адресу 0084:1f82cf20.
Регистры:
EAX=00d70094 CS=0167 EIP=1f82cf20 EFLGS=00010202
EBX=00d705e0 SS=016f ESP=0063fc58 EBP=0063fc78
ECX=00000000 DS=016f ESI=00d70b80 FS=610f
EDX=00000080 ES=016f EDI=00000001 GS=0000
Байты по адресу CS:EIP:

Содержимое стека:
1f702718 00000003 006ae6c8 00d70000 007bcd70 00000000 00000000 00000000 0063fd10 1f702505 00d70b80 00000001 00000010 00761adc 007bcd70 10037cb1

Source fragment:

class Action
{
        var $ID;
        var $Name;
        var $Parameters;
        var $Done=false;
        var $events=array();
        var $Result;

        function Action($Type,$Parameters)
        {
                global $base;

                // Find this action in table
                switch(gettype($Type)){
                  case 'integer': $where='ID='.$Type;break;
                  case 'string': $where='Name='.$base->qstr($Type);break;
                  default: trigger_error('Incorrect Type parameter in Action()',E_USER_ERROR);
                }

                if(!$action=$base->Execute('SELECT * From Actions WHERE '.$where))
                        trigger_error('Unknown Type in Action()',E_USER_ERROR); // <-- line 52 is here!

                $sk=sorted_keys($Parameters);

                while(!$action->EOF())
                {
                        $sorted_params=sort(split(',',$action->Parameters));
                        $sorted_params=merge(',',$sorted_params);
                        
                        if($sorted_params==$sk) break;
                        $action->MoveNext();
                }

Sorry, but I can't provide the full sources for this case!

-- 
Edit Bug report at: http://bugs.php.net/?id=10459&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>