Title: Fatal Error: Loco Translate incompatibility with PHP 8.0 and ArrayIterator
Last modified: May 20, 2025

---

# Fatal Error: Loco Translate incompatibility with PHP 8.0 and ArrayIterator

 *  Resolved [dchloros](https://wordpress.org/support/users/dchloros/)
 * (@dchloros)
 * [11 months ago](https://wordpress.org/support/topic/fatal-error-loco-translate-incompatibility-with-php-8-0-and-arrayiterator/)
 * Hello,
 * I am experiencing a critical error when trying to access the LearnPress plugin’s
   translation interface in Loco Translate.
 * The specific error message from my debug.log is:
 * PHP Fatal error: Declaration of ArrayIterator::getArrayCopy() must be compatible
   with LocoArrayInterface::getArrayCopy(): array in /wp-content/plugins/loco-translate/
   lib/compiled/gettext.php on line 0
 * My website details are:
    - WordPress Version: 6.6.2
    - PHP Version: 8.0
    - Loco Translate Version: Έκδοση 2.7.3 
 * I have already tried the following troubleshooting steps:
    1. Updated Loco Translate to the latest available version.
    2. Deactivated and then reinstalled Loco Translate.
 * The issue persists, and I am unable to access the LearnPress translation files.
   I would prefer not to downgrade my PHP version if possible.
 * Could you please provide assistance with this compatibility issue?
 * Thank you for your time.

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

 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [11 months ago](https://wordpress.org/support/topic/fatal-error-loco-translate-incompatibility-with-php-8-0-and-arrayiterator/#post-18474550)
 * Thanks for reporting. I’ll look at fixing this ASAP.
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [11 months ago](https://wordpress.org/support/topic/fatal-error-loco-translate-incompatibility-with-php-8-0-and-arrayiterator/#post-18474652)
 * This is fixed in the [dev version](https://localise.biz/wordpress/plugin/developers).
   The next release will include this fix.
 * If you don’t want to install the dev version and you can’t wait for the next 
   release then you can manually patch the [gettext.php](https://github.com/loco/wp-loco/blob/master/lib/compiled/gettext.php)
   file. Just remove the return type declaration on line 7 so that `getArrayCopy():
   array;` becomes just `getArrayCopy();`
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [11 months ago](https://wordpress.org/support/topic/fatal-error-loco-translate-incompatibility-with-php-8-0-and-arrayiterator/#post-18475987)
 * Alternatively, roll back to 2.7.2.
 * The 2.7.3 release doesn’t include any changes you will benefit from under PHP
   8.0.
 *  Plugin Author [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * (@timwhitlock)
 * [11 months ago](https://wordpress.org/support/topic/fatal-error-loco-translate-incompatibility-with-php-8-0-and-arrayiterator/#post-18476693)
 * > Alternatively, roll back to 2.7.2.
 * The [Advanced View](https://wordpress.org/plugins/loco-translate/advanced/) of
   the WordPress plugin page provides all historical versions for download.
 * Alternatively, you can manage your installed version manually using [Git tags](https://github.com/loco/wp-loco/releases).

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

The topic ‘Fatal Error: Loco Translate incompatibility with PHP 8.0 and ArrayIterator’
is closed to new replies.

 * ![](https://ps.w.org/loco-translate/assets/icon-256x256.png?rev=1000676)
 * [Loco Translate](https://wordpress.org/plugins/loco-translate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/loco-translate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/loco-translate/)
 * [Active Topics](https://wordpress.org/support/plugin/loco-translate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/loco-translate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/loco-translate/reviews/)

## Tags

 * [compatibility](https://wordpress.org/support/topic-tag/compatibility/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [PHP 8.0](https://wordpress.org/support/topic-tag/php-8-0/)

 * 4 replies
 * 4 participants
 * Last reply from: [Tim W](https://wordpress.org/support/users/timwhitlock/)
 * Last activity: [11 months ago](https://wordpress.org/support/topic/fatal-error-loco-translate-incompatibility-with-php-8-0-and-arrayiterator/#post-18476693)
 * Status: resolved