Title: Php Error after update
Last modified: January 20, 2023

---

# Php Error after update

 *  [Patrixer](https://wordpress.org/support/users/patrixer/)
 * (@patrixer)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/)
 * Hi, after yesterday update my page was broken (error 500 and php error pointed
   to class file).
 * I managed to fix that by adding translation name to lines:
 *     ```wp-block-code
       		$this->avatar_ratings = array(
       			/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
       			'G'  => __( 'G — Suitable for all audiences', ),
       			/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
       			'PG' => __( 'PG — Possibly offensive, usually for audiences 13 and above', ),
       			/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
       			'R'  => __( 'R — Intended for adult audiences above 17', ),
       			/* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */
       			'X'  => __( 'X — Even more mature than above', ),
       		);
       ```
   
 * After that, my website started to work:
 *     ```wp-block-code
       'G'  => __( 'G — Suitable for all audiences', 'simple-local-avatars'),
       ```
   
 * Any idea why this throw an error?
 * Will you fix it in next update?
 * What’s more, error 500 was only on one from two languages on my page using wpml(
   second language works as usual)
 * Best regards, Patrick.

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

 *  [SeKra](https://wordpress.org/support/users/sekra/)
 * (@sekra)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16415760)
 * Same here ☝
 *  Plugin Contributor [Darin Kotter](https://wordpress.org/support/users/dkotter/)
 * (@dkotter)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16423521)
 * [@patrixer](https://wordpress.org/support/users/patrixer/) [@sekra](https://wordpress.org/support/users/sekra/)
   Thanks for the reports. Can you let me know which version of Simple Local Avatars
   you had issues with? I believe this issue should have been fixed in the last 
   release, v2.7.3, so just want to verify what version you’re having this problem
   in. Thanks!
 *  [SeKra](https://wordpress.org/support/users/sekra/)
 * (@sekra)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16423535)
 * Hey [@dkotter](https://wordpress.org/support/users/dkotter/) , thank you for 
   addressing this issue. As [@patrixer](https://wordpress.org/support/users/patrixer/)
   mentioned, the problem is originated by the missing domain for the gettext function
   __().
 * I’m using version 2.7.3 and there is still and issue. I had to edit the main 
   plugin file (what I normally not do!) to get rid of this.
 * The file that the error occurs is /wp-content/plugins/simple-local-avatars/includes/
   class-simple-local-avatars.php lines 527 – 533
 * Just add the domain to the __() function and it should be fixed.
 * Thank you, greetings from Germany 🙂
 * Sebastian
 *  Plugin Contributor [Darin Kotter](https://wordpress.org/support/users/dkotter/)
 * (@dkotter)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16426527)
 * [@sekra](https://wordpress.org/support/users/sekra/) Thanks for the followup.
   Do you happen to know what error message you were getting without that in place?
   We removed our custom textdomain from those strings since these are translated
   by WordPress itself. But if that’s causing errors, we’ll obviously need to fix
   this up.
 *  Plugin Contributor [Darin Kotter](https://wordpress.org/support/users/dkotter/)
 * (@dkotter)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16426541)
 * And I guess one followup, which version of PHP are you running?
 *  [SeKra](https://wordpress.org/support/users/sekra/)
 * (@sekra)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16427015)
 * Hey [@dkotter](https://wordpress.org/support/users/dkotter/) , thank you for 
   following up. I just realized the bug is simple 😉 The domain has been removed
   but not the comma “,” after the string you want to translate. So simple remove
   the commas after the translation string.
 *     ```wp-block-code
       // Just change this
       'G'  => __( 'G — Suitable for all audiences', )
   
       // to this
       'G'  => __( 'G — Suitable for all audiences' )
       ```
   
 * Simply remove the commas after the translation strings and the error will be 
   gone. Please note there are 4 occurrences in your code. For G, PG, R and X.
 * Hope that helps 😉
 * Best, Sebastian
    -  This reply was modified 3 years, 4 months ago by [SeKra](https://wordpress.org/support/users/sekra/).
 *  [SeKra](https://wordpress.org/support/users/sekra/)
 * (@sekra)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16427020)
 * PHP version 8.1.14 🙂
 *  Plugin Contributor [Darin Kotter](https://wordpress.org/support/users/dkotter/)
 * (@dkotter)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16427456)
 * Thanks for the help! I had saw that myself but I thought trailing commas only
   caused issues in PHP 7.2 or less and our minimum is PHP 7.4. But if you’re having
   issues while running PHP 8.1, seems this is a bigger issue that we should fix.
 * Do you have a GitHub username that we can give props to for this? Or feel free
   to open a PR ([https://github.com/10up/simple-local-avatars/pulls](https://github.com/10up/simple-local-avatars/pulls))
   if you want, otherwise I can look to take care of that in the next day or two
 *  Thread Starter [Patrixer](https://wordpress.org/support/users/patrixer/)
 * (@patrixer)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16427576)
 * Hello [@dkotter](https://wordpress.org/support/users/dkotter/)
 * Thank you for your answer! However it can be something else – I’m using PHP 7.4.33
   and 2.7.3 plugin version, however I didn’t try to remove comma. I will let you
   know, but it will probably also fix this issue

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

The topic ‘Php Error after update’ is closed to new replies.

 * ![](https://ps.w.org/simple-local-avatars/assets/icon.svg?rev=2783752)
 * [Simple Local Avatars](https://wordpress.org/plugins/simple-local-avatars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-local-avatars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-local-avatars/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-local-avatars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-local-avatars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-local-avatars/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [Patrixer](https://wordpress.org/support/users/patrixer/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-after-update-15/#post-16427576)
 * Status: not resolved