Bug #20009 [NEW]: Call to undefined method finfo::__destruct

From: Date: Thu, 18 Nov 2010 18:16:42 +0000
Subject: Bug #20009 [NEW]: Call to undefined method finfo::__destruct
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-6775@lists.php.net to get a copy of this message
From: arimbourg at ariworld dot eu Operating system: Mandriva 2010 linux free Package version: PHP version: 5_3 SVN-2010-11-18 (dev) Package: Web Site Bug Type: Bug Bug description: Call to undefined method finfo::__destruct Description: ------------ PHP 5.3.3 with Suhosin-Patch (cli) (built: Nov 9 2010 14:49:46) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH Apache mpm prefork Loaded modules : core prefork http_core mod_so mod_authn_file mod_authn_anon mod_authn_default mod_authn_alias mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_dbm mod_authz_owner mod_authz_default mod_auth_basic mod_auth_digest mod_include mod_filter mod_substitute mod_log_config mod_env mod_mime_magic mod_expires mod_headers mod_usertrack mod_unique_id mod_setenvif mod_version mod_mime mod_status mod_autoindex mod_info mod_cgi mod_vhost_alias mod_negotiation mod_dir mod_imagemap mod_actions mod_alias mod_rewrite mod_ssl mod_userdir mod_php5 Is it really a destructor for PECL Object Oriented usage? Currently, I can only unset the variable that contain the resource. Calling __destruct method give a fatal error. Reproduce code: --------------- <?php putenv ('MAGIC=/usr/share/misc/magic.mgc'); //Magic didn't work... other bug... ini_set ('display_errors', 1); $finfo = new finfo (); echo ($finfo->file ('index.php', FILEINFO_MIME) . "\n"); print_r (get_class_methods ('finfo')); // no __destruct method $finfo->__destruct (); // Error !! // finfo::__destruct () : Error too... as expected ?> Expected result: ---------------- text/x-php; charset=utf-8 Array ( [0] => finfo [1] => set_flags [2] => file [3] => buffer [4] => __destruct ) Actual result: -------------- text/x-php; charset=utf-8 Array ( [0] => finfo [1] => set_flags [2] => file [3] => buffer ) Fatal error: Call to undefined method finfo::__destruct() in /path/to/file.php on line 12 -- Edit bug report at http://pecl.php.net/bugs/bug.php?id=20009&edit=1 --

« previous php.pear.webmaster (#6775) next »