From:             [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:      4.2.3
PHP Bug Type:     Reproducible crash
Bug description:  Array handling within objects crash (obcure)

Within the object template, I have the following code which is valid (see
bottom). It is a caching mechanism where $this->blocks[$handle] is a piece
of html delimited by <!--##START.NAME##--><!--##END.NAME##-->, you get the
idea. An attempt to implement a caching system was met with a crash. The
problem appears to be somewhere within the means by which arrays are
handled. 

I used the following setup when reproducing this crash:

Server: Win32 Apache 1.3.26
PHP Installation: SAPI Module via php4apache.dll
OS: Windows 2000 Professional Service Pack 3

I have reason to believe that this may exist in the global code as well as
after testing it on another server, the array indices did not return a
value when set.

The alternate server (http://soulnet.tk):
OS: Windows XP
CPU: Dual Intel Pentiums 232Mhz (each)
Server: OmniHTTPD 1.0.1
PHP Installation: CGI-Binary

=============================================

function tpl_seek ( $handle , $name ) 
{

        $name = strtoupper ( $name );
                
if ( isset ( $this->tpl_cache[$handle][$name] ) ) return
$this->cache[$handle][$name];
                
        if ( preg_match ( "/<!--##START\.$name##-->(.+?)<!--##END\.$name##-->/si"
, $this->blocks[$handle] , $matches ) )
        {
                $this->tpl_cache[$handle][$name] = $matches[1];
                $this->current = $matches[1];
                return TRUE;
        }

        return FALSE;
}
-- 
Edit bug report at http://bugs.php.net/?id=20666&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20666&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20666&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20666&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20666&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20666&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20666&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20666&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20666&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20666&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20666&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20666&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20666&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20666&r=isapi

Reply via email to