Title: PHP error from rule-callbacks.php
Last modified: July 26, 2024

---

# PHP error from rule-callbacks.php

 *  Resolved [peter8nss](https://wordpress.org/support/users/peter8nss/)
 * (@peter8nss)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-error-from-rule-callbacks-php/)
 * Noticed the following error in my system log:
 *     ```wp-block-code
       Trying to access array offset on value of type null in ..../public_html/wp-content/plugins/content-control/inc/functions/rule-callbacks.php on line 520
       ```
   
 * If “get_rest_api_intent” is called when global “rest_intent” is null there is
   code to calculate and set the value of global “rest_intent”. However, the value
   passed to the return statement apply_filter is the old null value NOT the new
   calculated value. So I think null will be passed back in this case, causing the
   error above.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [peter8nss](https://wordpress.org/support/users/peter8nss/)
 * (@peter8nss)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-error-from-rule-callbacks-php/#post-17917649)
 * Think this is happening when trying to access Content Control Settings page.
 *  Plugin Support [Kim L](https://wordpress.org/support/users/kimmyx/)
 * (@kimmyx)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-error-from-rule-callbacks-php/#post-17918191)
 * Hi [@peter8nss](https://wordpress.org/support/users/peter8nss/),
 * Thanks for the report!
 * We’ve passed this to our dev team so they can take a look.
 * We’ll let you know once we receive feedback.
 * If you have more information related to the issue, please send us a ticket via
   [Get Support – Content Control Plugin](https://contentcontrolplugin.com/support/).
 * We appreciate your patience! 🙏
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/php-error-from-rule-callbacks-php/#post-17918424)
 * [@peter8nss](https://wordpress.org/support/users/peter8nss/) – Appreciate the
   details, you nailed it. Patched for the next release.
   Fix was simply to rename
   $result -> $intent.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP error from rule-callbacks.php’ is closed to new replies.

 * ![](https://ps.w.org/content-control/assets/icon-256x256.gif?rev=2968535)
 * [Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More](https://wordpress.org/plugins/content-control/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-control/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-control/)
 * [Active Topics](https://wordpress.org/support/plugin/content-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-control/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/php-error-from-rule-callbacks-php/#post-17918424)
 * Status: resolved