Skip to content

Fatal error: Call to a member function getPriority() on null in C:\xampp\htdocs\math\vendor\nxp\math-executor\src\NXP\Classes\Lexer.php on line 107 #1

Description

@falinhares

I've installed math-executor through Composer, ran some tests on the first code and came to this issue:

Code:
require "vendor/autoload.php";
$calculator = new \NXP\MathExecutor();
print $calculator->execute("1 + 2 * (2 - (4+10))^2 + sin(10)");
print $calculator->execute("(4+10)^2");
Output:
-19.544021110889
Notice: Undefined offset: -1 in C:\xampp\htdocs\math\vendor\nxp\math-executor\src\NXP\Classes\Lexer.php on line 107

Fatal error: Call to a member function getPriority() on null in C:\xampp\htdocs\math\vendor\nxp\math-executor\src\NXP\Classes\Lexer.php on line 107

How can I fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions