php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8791 core dump when trying to get_class_vars on a class with a hash variable
Submitted: 2001-01-18 13:37 UTC Modified: 2001-01-24 20:30 UTC
From: rduarte at tvgrid dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.3pl1 OS: Linux
Private report: No CVE-ID: None
 [2001-01-18 13:37 UTC] rduarte at tvgrid dot com
TEST SCRIPT:
<?
class xyz {
        var $x = array('a' => 'df', 'b' => 'dd', 'c' => 'fd');
}
$arr = get_class_vars('xyz');
while(list($key,$val) = each($arr)) print "Properties $key has value : $val\n";
?>

CONFIG LINE:
 './configure' '--with-mysql=/usr/local/mysql' '--enable-track-vars' '--without-gd' '--with-xml' '--without-ldap' '--without-imap'

Sorry, I couldn't get a gdb backtrace because my php wasn't compiled with the debug stuff turned on.  I suspect that you'd be able to reproduce this easily though.  Let me know if you need any more information from me.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-19 21:35 UTC] sniper@php.net
Does this happen with PHP 4.0.4pl1 ? I tried with latest CVS and it didn't crash.

--Jani
 [2001-01-23 11:11 UTC] rduarte at tvgrid dot com
Nope.  Must've been fixed between 4.0.3pl1 and 4.0.4pl1 because it doesn't core dump after upgrading.  I'm still not sure it does what I'd expect, though, since in my example, I'd expect printing $val to output "Array" but it doesn't output anything.  If I print_r($val) it does show the contents of the array though.  That's definitely good enough for what I'm trying to do, but it seems like it's not 100%.  Thanks a lot for the help!
 [2001-01-24 20:30 UTC] sniper@php.net
Fixed -> closed.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 11:01:31 2024 UTC