Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.18

Bug #6445 PEAR::registerShutdownFunc doesn't work in static calls
Submitted: 2006-01-08 21:14 UTC
From: soporte at onfocus dot cl Assigned: cellog
Status: Closed Package: PEAR
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 29 + 26 = ?

 
 [2006-01-08 21:14 UTC] soporte at onfocus dot cl
Description: ------------ System::mktemp calls PEAR::registerShutdownFunc but that method fails if used statically. This is not specific to System package, but all who use PEAR::registerShutdownFunc . Test script: --------------- <?php require_once 'System.php'; $path = System::mktemp('deleteme'); ?> ===================== patch in PEAR.php#248 ===================== function registerShutdownFunc($func, $args = array()) { if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { register_shutdown_function("_PEAR_call_destructors"); $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; } $GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args); } Expected result: ---------------- file deleted after script execution. Actual result: -------------- file never deleted.

Comments

 [2006-01-23 05:38 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!