PHP Fatal error (regarding Shortcode to output expiry date)
-
The latest version released today (3.0.5) seems to break the Shortcode that outputs the expiry date on the front end. Here’s the error we’re seeing on one of our websites that uses the plugin:
PHP message: PHP Fatal error: Uncaught Error: Call to undefined method PublishPress\\Future\\Modules\\Expirator\\Models\\ExpirablePostModel::getExpiratigetExpirationDateAsUnixTimeonDate() in /container/application/public/wp-content/plugins/post-expirator/legacy/functions.php:719
I did some basic debugging and this is the code on line 719 of the file in question, from the latest version of the plugin:
$expirationDateTs = $postModel->getExpiratigetExpirationDateAsUnixTimeonDate();
You can see that the variable name is a bit dodgy (getExpiratigetExpirationDateAsUnixTimeonDate). Here’s the same line (which was on line 706 in version 3.0.4) from the previous version of the plugin which did not have this issue:
$expirationDateTs = $postModel->getExpirationDate();
I tried replacing line 719 in the new plugin with the previous code (the code directly above this paragraph), but no joy.
Any thoughts on what could be the issue? The site in question is running WordPress 6.2.2, on PHP 7.4.33.
- The topic ‘PHP Fatal error (regarding Shortcode to output expiry date)’ is closed to new replies.