Title: PHP warning on cache generation
Last modified: March 6, 2024

---

# PHP warning on cache generation

 *  Resolved [klemza](https://wordpress.org/support/users/klemza/)
 * (@klemza)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/php-warning-on-cache-generation/)
 * Hello,
 * I have noticed that there is a php warning when the plugin tries to generate 
   a new cache key. It should be a simple fix. 
   In function get_cache you should
   check if $exparation is set (line: 134).
 * Warning (PHP 8.1):
   **Deprecated: strtotime(): Passing null to parameter #1 ($
   datetime) of type string is deprecated in /srv/www/hit2023/current/web/app/plugins/
   wp-rest-cache/includes/caching/class-caching.php on line **_135_
 * ![](https://i0.wp.com/i.imgur.com/YEpvpDX.png?ssl=1)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/php-warning-on-cache-generation/#post-17479140)
 * Hi [@klemza](https://wordpress.org/support/users/klemza/)
   Thank you for using
   our plugin!Yes we were made aware of it and already had a fix ready for deploy.
   I just deployed a new version of our plugin including this fix.

Viewing 1 replies (of 1 total)

The topic ‘PHP warning on cache generation’ is closed to new replies.

 * ![](https://ps.w.org/wp-rest-cache/assets/icon-256x256.png?rev=3328849)
 * [WP REST Cache](https://wordpress.org/plugins/wp-rest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-rest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-rest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-rest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-rest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-rest-cache/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/php-warning-on-cache-generation/#post-17479140)
 * Status: resolved