Title: uncaught php error in error.log
Last modified: August 21, 2024

---

# uncaught php error in error.log

 *  Resolved [charmedchicken](https://wordpress.org/support/users/charmedchicken/)
 * (@charmedchicken)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/uncaught-php-error-in-error-log/)
 * Hello,
 * I received an error on my website when saving a post and then checked my error
   log and found this error today:
 * [21-Aug-2024 14:44:18 UTC] PHP Fatal error: Uncaught Error: Call to undefined
   function WordfenceLS\get_current_site() in /home/(redacted)/(redacted).com/wp-
   content/plugins/wordfence/modules/login-security/classes/controller/permissions.
   php:128 Stack trace: #0 /home/(redacted)/(redacted).com/wp-includes/class-wp-
   hook.php(324): WordfenceLS\Controller_Permissions->_role_sync_cron() #1 /home/(
   redacted)/(redacted).com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”,
   Array) #2 /home/(redacted)/(redacted).com/wp-includes/plugin.php(565): WP_Hook-
   >do_action(Array) #3 /home/(redacted)/(redacted).com//wp-cron.php(191): do_action_ref_array(‘
   wordfence_ls_ro…’, Array) #4 {main} thrown in /home/(redacted)/(redacted).com/.
   com/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.
   php on line 128
 * Wanted to make you aware. Thank you.

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

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/uncaught-php-error-in-error-log/#post-17967728)
 * Hi [@charmedchicken](https://wordpress.org/support/users/charmedchicken/), thanks
   for the detailed error message.
 * `get_current_site()` should only be running on multisite installations. Is this
   part of a multisite, or a single site moved from a multisite installation at 
   some point?
 * If not, we have also seen this when another plugin is loading some WordPress 
   core files out of order, so the function doesn’t exist yet at the time that we
   call it. That may require all plugins disabling (except for Wordfence) to see
   if it suppresses the message. If it does, reenable your plugins one-by-one to
   see when the error returns – which should point to the plugin causing the change
   in load order.
 * Many thanks,
   Peter.
 *  Thread Starter [charmedchicken](https://wordpress.org/support/users/charmedchicken/)
 * (@charmedchicken)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/uncaught-php-error-in-error-log/#post-17967795)
 * Yes, it was a multi-site installation. I went into my wp_config and just changed
   multisite to false some time ago since I may want to return to a true multi-site
   installation at some point. Should I just make it a real multi-site and see if
   that fixes the error? 
   The error was a 503 error that prompted me to look in 
   errors.log
 * Thanks,
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/uncaught-php-error-in-error-log/#post-18020312)
 * I would see if that’s the case if you haven’t already.
 * Also double-check that you’ve cleared any caches that might still be loading 
   the wp_config as a multisite when it isn’t one any longer.
 * Peter.

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

The topic ‘uncaught php error in error.log’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 3 replies
 * 2 participants
 * Last reply from: [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/uncaught-php-error-in-error-log/#post-18020312)
 * Status: resolved