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

Bug #6576 PFM2 run in trouble with sessions
Submitted: 2006-01-25 11:46 UTC
From: farell Assigned: cellog
Status: Closed Package: PEAR (version 1.4.6)
PHP Version: 4.4.2 OS: Windows XP
Roadmaps: (Not assigned)    
Subscription  


 [2006-01-25 11:46 UTC] farell
Description: ------------ Even if this bug is related to PEAR_PackageFileManager2 (PFM2), due to share code, PEAR need a fix. I run in trouble with PFM2 while using session. This problem is well known in PHP world and gave something like message in actual result. To fix it i suggest : - in class contructor of PEAR\PackageFile\v2.php to add $this->_v2Validator = new PEAR_PackageFile_v2_Validator(); - don't forget to add property $_v2Validator in this class - add the dependency out of class declaration or let where it is already implemented (see analyzeSourceCode, validate methods) require_once 'PEAR/PackageFile/v2/Validator.php'; BTW, in finding source of my problem, i've discovered that property $_filesValid is missing in PEAR\PackageFile\v2\Validator.php class declaration. Hope it will help Laurent Actual result: -------------- Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition pear_packagefile_v2_validator of the object you are trying to operate on was loaded _before_ the session was started in [...]\PEAR\PackageFile\v2.php on line 1872

Comments

 [2006-01-28 17:33 UTC] cellog
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2006-01-29 10:32 UTC] farell
Fixed is not complete: You've missed $_v2Validator property declaration and check in validate() method. The same check you've applied into analyzeSourceCode() method. hope my cvs diff patch is correct : Index: v2.php =================================================================== RCS file: /repository/pear-core/PEAR/PackageFile/v2.php,v retrieving revision 1.127 diff -r1.127 v2.php 124c124 < * - dependencies --- > * - dependencies 130a131,135 > * > */ > var $_v2Validator; > > /** 1540c1545 < } --- > } 1558c1563 < } --- > } 1868c1873,1874 < if (!isset($this->_v2Validator)) { --- > if (!isset($this->_v2Validator) || > !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) { 1999c2005 < ?> --- > ?> \ No newline at end of file
 [2006-02-04 00:26 UTC] cellog
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.