Fatal error when function block is empty, or when declaring interfaces
Closed this issue · 3 comments
quanyang commented
Example:
<?php
interface Iface {
function test();
}
Or
<?php
class NameOfClass {
function test() {
}
function doSomething() {
echo "Hello World";
}
}
Error:
Catchable fatal error: Argument 1 passed to PHPCfg\Visitor\DeclarationFinder::beforeTraverse() must be an instance of PHPCfg\Block, null given in /php-cfg/lib/PHPCfg/Visitor/DeclarationFinder.php on line 76
nikic commented
This should probably do it: 21c299b Need to write some visitor tests when back home.
quanyang commented
Issue got regressed to another section of code:
Catchable fatal error: Argument 1 passed to PHPCfg\Traverser::traverseBlock() must be an instance of PHPCfg\Block, null given, called in php-cfg/lib/PHPCfg/Traverser.php on line 35 and defined in /php-cfg/lib/PHPCfg/Traverser.php on line 45