joelt
(Joel Tanis)
February 6, 2025, 7:22pm
1
Just a heads up!
I just updated my site with MainWP Dashboard 5.3.5 and got a Critical error on WordPress.
Error Details
An error of type E_PARSE was caused in line 775 of the file /wp-content/plugins/mainwp/class/class-mainwp-hooks.php. Error message: syntax error, unexpected ‘:’, expecting ‘)’
Line 775:
} elseif ( ! is_object( value: $website ) || ! property_exists( $website, ‘id’ ) ) {
I edited to:
} elseif ( ! is_object( $website ) || ! property_exists( $website, ‘id’ ) ) {
This edit fixed the problem for me.
1 Like
bojan
(Bojan Katusic)
February 6, 2025, 7:32pm
2
Hey @joelt
Thanks for the report.
We are aware of the issue and the hotfix release will be out shortly.
It manifests itself only on Dashboard sites with the PHP version below v8.
2 Likes
bojan
(Bojan Katusic)
February 6, 2025, 8:25pm
3
Thanks for reporting this to us.
We have now released a hotfix v5.3.5.1 which resolves the issue on PHP versions ≥7.4 and <8.0.
Changelog
5.3.5.1 – 2-6-2025
Fixed: Resolved a syntax error caused by the incorrect use of a named argument, ensuring compatibility with PHP 7.x and earlier versions.
1 Like
system
(system)
Closed
February 7, 2025, 8:25pm
4
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.