Skip to content

Cannot access property started with '\0' #71

@mircobabini

Description

@mircobabini

PHP Fatal error: Uncaught Error: Cannot access property started with '\0' in /wp-content/plugins/better-search-replace/includes/class-bsr-db.php:344

It's a known issue on PHP 7.3.
This is because of the empty char which IS NOT exactly an empty character but "*_".
You can't have a property starting with *.

$item->*_tbl becomes $item->\0_tbl. It's from the wp_options in my case.

Btw, solution is:

$key = trim( $key );
$this->$key = ...

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