Title: PHP 8 Warning: Undefined array key &#8220;cacheStore&#8221; + minor code issues
Last modified: April 26, 2026

---

# PHP 8 Warning: Undefined array key “cacheStore” + minor code issues

 *  Resolved [aduwow](https://wordpress.org/support/users/aduwow/)
 * (@aduwow)
 * [1 month ago](https://wordpress.org/support/topic/php-8-warning-undefined-array-key-cachestore-minor-code-issues/)
 * Hello,
 * I’m using the WP-Appbox plugin and encountered a PHP 8 warning in the admin area:
 *     ```wp-block-code
       Warning: Undefined array key "cacheStore"
       ```
   
 * 📍 Location
 * The issue occurs in the following file:
 *     ```wp-block-code
       wp-appbox/admin/settings-cache-list.php
       ```
   
 * 🔍 Root cause
 * The warning is caused by accessing `$_POST['cacheStore']` without checking if
   the key exists.
 * Examples:
 *     ```wp-block-code
       selected( $_POST['cacheStore'], $storeID );
       ```
   
 * and:
 *     ```wp-block-code
       $this->fillData( sanitize_text_field( $_POST['cacheSearch'] ), sanitize_text_field( $_POST['cacheStore'] ) );
       ```
   
 * In PHP 8+, this triggers a warning when the form has not been submitted yet.✅
   Suggested fix
 * Use `isset()` or null coalescing to prevent undefined array key warnings:
 *     ```wp-block-code
       selected( $_POST['cacheStore'] ?? '', $storeID );
       ```
   
 * and:
 *     ```wp-block-code
       $search = isset($_POST['cacheSearch']) ? sanitize_text_field($_POST['cacheSearch']) : '';
       $store  = isset($_POST['cacheStore']) ? sanitize_text_field($_POST['cacheStore']) : '';
   
       $this->fillData($search, $store);
       ```
   
 * ⚠️ Additional issue
 * There is also a syntax issue in the same file:
 *     ```wp-block-code
       else( false );
       ```
   
 * This should be:
 *     ```wp-block-code
       else return false;
       ```
   
 * Please consider updating the plugin for PHP 8 compatibility.
 * Thanks!

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-8-warning-undefined-array-key-cachestore-minor-code-issues%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

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

 * 0 replies
 * 1 participant
 * Last reply from: [aduwow](https://wordpress.org/support/users/aduwow/)
 * Last activity: [1 month ago](https://wordpress.org/support/topic/php-8-warning-undefined-array-key-cachestore-minor-code-issues/)
 * Status: resolved