Bug #10979 Updated: segfault on get_class_methods("Directory");
| From: | sniper@php.net | Date: | Sun, 20 May 2001 23:22:29 +0000 |
| Subject: | Bug #10979 Updated: segfault on get_class_methods("Directory"); | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-55979@lists.php.net to get a copy of this message | ||
ID: 10979
Updated by: sniper
Reported By: enigma@turingstudio.com
Old-Status: Open
Status: Closed
Bug Type: Reproducible crash
Operating system:
PHP Version: 4.0.4pl1
Assigned To:
Comments:
This seems to be fixed in PHP 4.0.6RC1.
Please try it:
http://www.php.net/~andi/php-4.0.6RC1.tar.gz
Reopen if it segfaults with that.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-05-21 00:02:00] enigma@turingstudio.com
I'm writing a little method in a debug class that outputs
all of the loaded classes for the system, using
get_class_methods().
My class started to segfault with this code:
function _output_all_classes() {
$this->_output_header('All Classes');
$classes = get_declared_classes();
foreach ($classes as $key) {
echo $key;
echo "n";
$class_methods = get_class_methods($key);
if ($class_methods != '') {
foreach ($class_methods as $key) {
echo " ";
echo $key;
}
}
echo "nn";
$vars = get_class_vars($key);
if ($vars != '') {
foreach ($vars as $key) {
echo " ";
echo $key;
}
}
}
}
So I got a list, and tested each name individually.
This code segfaults apache:
get_class_methods("Directory");
not a bid deal, as this is a default class, but I think
this is probably unexpected behavior :)
_alex
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10979&edit=2