~fd/grav-plugin-staticmath#2: 
error after installation plugin

TypeError Failed to create closure from callable: class 'Grav\Plugin\StaticmathPlugin' does not have a method 'onGetPageBlueprints' public_html/vendor/symfony/event-dispatcher/EventDispatcher.php

 * Optimizes the internal list of listeners for the given event by priority.
 */
private function optimizeListeners(string $eventName): array
{
    krsort($this->listeners[$eventName]);
    $this->optimized[$eventName] = [];

    foreach ($this->listeners[$eventName] as &$listeners) {
        foreach ($listeners as &$listener) {
            $closure = &$this->optimized[$eventName][];
            if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
                $closure = static function (...$args) use (&$listener, &$closure) {
                    if ($listener[0] instanceof \Closure) {
                        $listener[0] = $listener[0]();
                        $listener[1] = $listener[1] ?? '__invoke';
                    }
                    ($closure = \Closure::fromCallable($listener))(...$args);
                };
            } else {
                $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener);
            }
        }
    }

    return $this->optimized[$eventName];
}

}

Arguments

"Failed to create closure from callable: class 'Grav\Plugin\StaticmathPlugin' does not have a method 'onGetPageBlueprints'"
Status
RESOLVED CLOSED
Submitter
~razdvizh
Assigned to
No-one
Submitted
9 months ago
Updated
9 months ago
Labels
bug

~fd REPORTED CLOSED 9 months ago

Resolved in v1.0.2.

Thanks for the report!

Register here or Log in to comment, or comment via email.