|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56612 runkit_import() cannot handle files w/ two or more classes inside
Submitted: 2005-10-24 11:29 UTC Modified: 2005-10-25 19:59 UTC
From: stuart at gentoo dot org Assigned: pollita (profile)
Status: Closed Package: runkit (PECL)
PHP Version: 4.3.9 OS: Linux
Private report: No CVE-ID: None
 [2005-10-24 11:29 UTC] stuart at gentoo dot org
Hi Sara,

If runkit_import() is pointed at a PHP file that contains two or more classes, runkit_import() fails with the error "Non-class in class table!" from line 240 of runkit_import.c.  See test-3.php in the runkit-tests tarball listed below.

It looks like the problem is that you can't use zend_hash_move_backwards() safely after removing the current node in the class table.  I've made a patch [1] which does the zend_hash_move_backwards() first; it works for me so far.  I've added the patch to Gentoo's runkit packages for php4 and php5.

I haven't audited the rest of runkit for similar problems; there may be other places where the same original approach has been used.


Reproduce code:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-25 19:59 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Thanks for the patch.
 [2007-09-29 09:22 UTC] fhj at gfd dot jdk
forex   ??ј?
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 01:01:30 2024 UTC