Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Undefined property: PhpParser\Node\Stmt\Class_ #24

Closed
abhayganjoo92 opened this issue Nov 10, 2020 · 3 comments
Closed

Undefined property: PhpParser\Node\Stmt\Class_ #24

abhayganjoo92 opened this issue Nov 10, 2020 · 3 comments

Comments

@abhayganjoo92
Copy link

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 ?

@eric-therond
Copy link
Collaborator

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
ircmaxell/php-cfg#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: #20

Eric

@eric-therond
Copy link
Collaborator

Done in v1.0.0

@eric-therond
Copy link
Collaborator

progpilot version (v1.0.2) solves this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants