-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot access property started with '\0' #71
Comments
Resolves deliciousbrains#71 PHP Fatal error: Uncaught Error: Cannot access property started with '\0' in /var/www/quick2web/wp-content/plugins/better-search-replace/includes/class-bsr-db.php:344
Thank you very much @mircobabini |
Sounds more like you're dealing with the array representation of a protected property, whose key would be of format
Yes, you can if you set it like this: https://3v4l.org/P81e4, which is exactly what your proposed fix is doing. My proposal would be to skip those properties via: if (!str_starts_with($key , "\0")) {
$_tmp->$key = ...
} |
Thanks for the report @mircobabini, and the fix suggestion @jdreesen. This issue has been resolved by #101. |
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:
The text was updated successfully, but these errors were encountered: