Skip to content

Do not call system-defined functions #2

@ghost

Description

Using get_defined_functions, do not call a system-defined function is_callable()

                if (is_callable($state)) {
                    $state = $state();
                }

                foreach ($state as $key => $value) {
                    if (is_callable($value)) { // <----- CHECK IF SYSTEM DEFINED FUNCTION
                        $state[$key] = $value();
                    }
                }

We also need to account for laravel functions (this list is not exhaustive)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions