Community
Participate
Working Groups
Build Identifier: 20100218-1602 When the return statement of a class method has the function 'isset' as its outermost layer, 'generate element comment' throws the exception. Presumably there's something missing that prevents eclipse from determining the return type of the function 'isset' - see workaround below Bottom of exception stack is java.lang.NullPointerException at org.eclipse.php.ui.CodeGeneration.getMethodComment(CodeGeneration.java:385) Reproducible: Always Steps to Reproduce: Try to "generate element comment" for method 'doSomething' in the following examples: 1. class A { public function doSomething() { $a=1; return isset($a); } } 2. class A { public function doSomething() { $a=1; return (bool) isset($a); } } 3. class A { public function doSomething() { $a=1; return is_int($a); } } Expected results: - all examples generate an element comment Actual results: - Examples 2 & 3 generate the comment - Example 1 fails with the exception described Workaround: - prefix the 'isset' with '(bool)' or '!!' and generate the comment.
Could not reproduce this bug using latest code.
Verified fixed. Kalin Yanev kalin.a@zend.com