Undefined property: PhpParser\Node\Stmt\Class_
Hi
am getting below error while running progpilot
PHP Notice: Undefined property: PhpParser\Node\Stmt\Class_::$namespacedName in /vendor/ircmaxell/php-cfg/lib/PHPCfg/AstVisitor/MagicStringResolver.php on line 32 PHP Fatal error: Uncaught Error: Call to a member function toString() on null in /vendor/ircmaxell/php-cfg/lib/PHPCfg/AstVisitor/MagicStringResolver.php:32 Stack trace: #0 /vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(123): PHPCfg\AstVisitor\MagicStringResolver->enterNode(Object(PhpParser\Node\Stmt\Class_)) #1 /vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(146): PhpParser\NodeTraverser->traverseNode(Object(PhpParser\Node\Expr\New_)) #2 /vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(146): PhpParser\NodeTraverser->traverseNode(Object(PhpParser\Node\Expr\Assign)) #3 /vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(223): PhpParser\NodeTraverser->traverseNode(Object(PhpParser\Node\Stmt\Expression)) #4 /vendor/ircmaxell/php-cfg/lib/PHPCfg/AstVisitor/MagicStringResolver.php on line 32
any idea how this can be fixed ?
Hi can you try to use the latest version of progpilot to see if it solves the problem?
there is a open issue about this in the corresponding dependency used by progpilot https://github.com/ircmaxell/php-cfg/issues/53 I recommend you that to comment this issue to try to warn the maintainer
also surround progpilot analysis with try/catch, this way the analysis will not fail, see the answer here: https://github.com/designsecurity/progpilot/issues/20
Eric
Done in v1.0.0
progpilot version (v1.0.2) solves this.