Skip to content

Fatal error: Using $this when not in object context in \lib\Preprocessor.php(40) : eval()'d code on line 1 #1

@compojoom

Description

@compojoom

Ok, I cannot get this to work. I'm trying to override a static class as described in the documenation:

Patchwork\replace("A::__toString", function()
{
return "redefined";
});

But I only get:
Fatal error: Using $this when not in object context in \lib\Preprocessor.php(40) : eval()'d code on line 1

I'm on php 5.3.1

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