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

Bug #16811 should determine whether Net/IDNA.php is available less "destructively"
Submitted: 2009-11-20 17:29 UTC Modified: 2009-11-21 01:35 UTC
From: kguest Assigned: kguest
Status: Closed Package: Validate (version 0.8.2)
PHP Version: 5.2.5 OS: ubuntu
Roadmaps: (Not assigned)    
Subscription  


 [2009-11-20 17:29 UTC] kguest (Ken Guest)
Description: ------------ include_once is used to determine whether Net/IDNA is available. This causes an error to be raised (even with the @ supressor being used) and interacts in an inhibiting manner with the framework that I'm using. Test script: --------------- <?php set_error_handler("aiii", E_ALL); function aiii($errno, $errstr, $errfile, $errline) { echo "WHOOPS! $errno $errstr in $errfile @ $errline\n"; //throw an exception here... } require_once("Validate.php"); $email ="ken@guest.ie"; if (!Validate::email($email)) { echo "false\n"; } else { echo "true\n"; } ?> Expected result: ---------------- $ php validemail.php true ie no errors being caught. Actual result: -------------- $ php validemail.php WHOOPS! 2 Validate::include_once(Net/IDNA.php): failed to open stream: No such file or directory in /usr/share/php/Validate.php @ 527 WHOOPS! 2 Validate::include_once(): Failed opening 'Net/IDNA.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/php/Validate.php @ 527 true

Comments

 [2009-11-20 17:33 UTC] kguest (Ken Guest)
 [2009-11-21 01:32 UTC] kguest (Ken Guest)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: kguest
 [2009-11-21 01:35 UTC] kguest (Ken Guest)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. 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. committed patch at Amir's suggestion.