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

Bug #18058 Patch: fix some notices (which may cause a crash of other tools)
Submitted: 2010-11-15 12:11 UTC
From: mekras Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.4.3)
PHP Version: Irrelevant OS:
Roadmaps: 1.4.4    

 [2010-11-15 12:11 UTC] mekras (Mikhail Krasilnikov)
Description: ------------ In there is a number of checks written like this: if ($_phpDocumentor_setting['pear']) which generates a notice if array element not set. By itself is not a big problem. Unfortunately when PHPDoc called from another tool (such as Phing) notices may cause a crash of these tools. There are two simple ways to prevent this. First - use isset to check if such element egsists. Second - use "@" to supress notices. Attached patch (compatible with SVN trunk) uses second way.


 [2010-11-15 12:15 UTC] mekras (Mikhail Krasilnikov)
 [2010-12-07 18:05 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Verified
Hi Mikhail, Can you redo your patch with isset() or !empty() please? '@' is generally a bad way to go.
 [2010-12-07 18:49 UTC] mekras (Mikhail Krasilnikov)
 [2010-12-08 14:30 UTC] mekras (Mikhail Krasilnikov)
 [2011-09-24 11:00 UTC] ashnazg (Chuck Burgess)
-Status: Verified +Status: Assigned -Assigned To: +Assigned To: ashnazg -Roadmap Versions: +Roadmap Versions: 1.4.4
Verified patch runs fine against phpDocumentor SVN, on PHPs 5.3.8, 5.2.17, and 4.4.9.
 [2011-09-24 11:05 UTC] ashnazg (Chuck Burgess)
-Status: Assigned +Status: Closed
Committed to SVN.