-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
I got 'Illegal offset type' error on fresh installation via composer.
It is not just a notice. Class method analysis failed.
nikic/php-parser v4.0.2 35b8caf75e791ba1b2d24fec1552168d72692b12
php v7.0
Solved by type casting to string
diff --git a/package/src/progpilot/Transformations/Php/Transform.php
- $this->context->get_functions()->add_function($myfunction->get_name(), $myfunction);
+ $this->context->get_functions()->add_function((string)$myfunction->get_name(), $myfunction);
- $myfunction = $this->context->get_functions()->get_function($func->name, $class_name);
+ $myfunction = $this->context->get_functions()->get_function((string)$func->name, $class_name);
Metadata
Metadata
Assignees
Labels
No labels