Title: fatal error with wp-cron.php
Last modified: May 5, 2022

---

# fatal error with wp-cron.php

 *  Resolved [shawfactor](https://wordpress.org/support/users/shawfactor/)
 * (@shawfactor)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-with-wp-cron-php/)
 * Team,
 * I can’t work out why but wp-cron triggers a fatal error, when using Bp-rewriters
 * here is the error and teh stack trace.
 * Note the only plugins active are buiddypress and bp rewrites
 *     ```
       [05-May-2022 05:19:58 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/melbour9/northerntouchdotorg/wp-content/plugins/bp-rewrites/src/bp-xprofile/classes/class-xprofile-component.php:79
       Stack trace:
       #0 /home/melbour9/northerntouchdotorg/wp-includes/class-wp-hook.php(307): BP\Rewrites\XProfile_Component->reset_nav('')
       #1 /home/melbour9/northerntouchdotorg/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
       #2 /home/melbour9/northerntouchdotorg/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
       #3 /home/melbour9/northerntouchdotorg/wp-content/plugins/buddypress/bp-core/classes/class-bp-component.php(572): do_action('bp_xprofile_set...')
       #4 /home/melbour9/northerntouchdotorg/wp-content/plugins/buddypress/bp-xprofile/classes/class-bp-xprofile-component.php(280): BP_Component->setup_nav(Array, Array)
       #5 /home/melbour9/northerntouchdotorg/wp-content/plugins/bp-rewrites/src/bp-xprofile/classes/class-xprofile-component.php(63): BP_XProfile_Component->setup_nav(Array, Array)
       #6 /home/melbour9/northerntouchdotorg/wp-includes/class-wp-hook.php(307): BP\Rewrites\XProfile_Component->setup_nav('')
       #7 /home/melbour9/northerntouchdotorg/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
       #8 /home/melbour9/northerntouchdotorg/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
       #9 /home/melbour9/northerntouchdotorg/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(155): do_action('bp_setup_nav')
       #10 /home/melbour9/northerntouchdotorg/wp-includes/class-wp-hook.php(307): bp_setup_nav('')
       #11 /home/melbour9/northerntouchdotorg/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
       #12 /home/melbour9/northerntouchdotorg/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
       #13 /home/melbour9/northerntouchdotorg/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(267): do_action('bp_init')
       #14 /home/melbour9/northerntouchdotorg/wp-includes/class-wp-hook.php(307): bp_init('')
       #15 /home/melbour9/northerntouchdotorg/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
       #16 /home/melbour9/northerntouchdotorg/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
       #17 /home/melbour9/northerntouchdotorg/wp-settings.php(587): do_action('init')
       #18 /home/melbour9/northerntouchdotorg/wp-config.php(108): require_once('/home/melbour9/...')
       #19 /home/melbour9/northerntouchdotorg/wp-load.php(50): require_once('/home/melbour9/...')
       #20 /home/melbour9/northerntouchdotorg/wp-cron.php(44): require_once('/home/melbour9/...')
       #21 {main}
         thrown in /home/melbour9/northerntouchdotorg/wp-content/plugins/bp-rewrites/src/bp-xprofile/classes/class-xprofile-component.php on line 79
       ```
   

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

 *  Anonymous User
 * (@anonymized-6594935)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-with-wp-cron-php/#post-15620947)
 * Hi thanks for your report. I’ll look at it asap.
 *  Anonymous User
 * (@anonymized-6594935)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-with-wp-cron-php/#post-15634010)
 * Looking at the stack trace, it looks like the function BP Rewrites uses to reset
   some hooks like setting the BP Nav after the `bp_parse_query` hook is not fired.
   Could you share the code you’re using into a [GitHub Gist](https://gist.github.com/)?
 *  Thread Starter [shawfactor](https://wordpress.org/support/users/shawfactor/)
 * (@shawfactor)
 * [4 years ago](https://wordpress.org/support/topic/fatal-error-with-wp-cron-php/#post-15638088)
 * I’m not sure what code you mean?
 * The errors occurred with only buddypress and bp-rewrites active. I’m not modifying
   anything with code.
 *  Anonymous User
 * (@anonymized-6594935)
 * [4 years ago](https://wordpress.org/support/topic/fatal-error-with-wp-cron-php/#post-15644897)
 * Thanks for your reply. I was able to reproduce the notices. This will be fixed
   in version 1.2.0.
 * Here’s the fix being tested before merge: [https://github.com/buddypress/bp-rewrites/pull/39](https://github.com/buddypress/bp-rewrites/pull/39)

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

The topic ‘fatal error with wp-cron.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bp-rewrites_ececec.svg)
 * [BP Rewrites](https://wordpress.org/plugins/bp-rewrites/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bp-rewrites/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bp-rewrites/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-rewrites/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-rewrites/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-rewrites/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: Anonymous User
 * Last activity: [4 years ago](https://wordpress.org/support/topic/fatal-error-with-wp-cron-php/#post-15644897)
 * Status: resolved