Support the ongoing development of Laravel.io →
posted 10 years ago
Packages

I seem to miss the meaning of this exception and error message. Hoping someone who uses symfony more than i do can help here.

log.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Using $this when not in object context' in /var/www/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php(99) : eval()'d code:3 Stack trace: #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] []

code in quesiton is this line.

    eval("\$this->closure = {$__code__};");

from the following function

public function unserialize($serialized) { // Unserialize the data we need to reconstruct the SuperClosure $this->state = unserialize($serialized); list($code, $context) = $this->state;

    // Simulate the original context the Closure was created in
    extract($__context__);

    // Evaluate the code to recreate the Closure
    eval("\$this->closure = {$__code__};");
}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

tven7 tven7 Joined 11 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.