Skip to content

Can't name a variable $data #28

@sabas

Description

@sabas

I randomly upgraded from an old version to latest and I noticed I broke the website because I was naming variables data

Something like

Flight::render('serviceTable.php', [ 'data' => $data], 'content');

and it broke here
https://github.com/flightphp/core/blob/aaf9f62ecc6f2cb4b75c75d6d72351e8e19b611d/flight/template/View.php#L125

but I hadn't time to investigate as it was in production ( 🥇 ) so I simply renamed all the things to exData and it worked.
Perhaps a check or a note in the migration docs could be useful...

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