Title: Warning message recommendation will cause PHP error
Last modified: June 3, 2026

---

# Warning message recommendation will cause PHP error

 *  [Anthony Hortin](https://wordpress.org/support/users/ahortin/)
 * (@ahortin)
 * [5 days, 2 hours ago](https://wordpress.org/support/topic/warning-message-recommendation-will-cause-php-error/)
 * Hi,
 * I was running a plugin through this plugin checker and it produced a `WordPress.
   NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound` warning message 
   for a variable. It seems the only way to satisfy/resolve this error warning is
   by prefixing the global variable name with the Text Domain specified in the plugin.
   The issue with this is that Text Domains are typically either a single word, 
   or multiple words separated by hyphens. In my case, the Text Domain was set to`
   display-page-template-name`.
 * If I update the variable name to be prefixed with the Text Domain, such as `$
   display-page-template-name_return_string`, you end up with a PHP fatal error 
   due to the hyphens.
 * So at the moment, it doesn’t seem that you’re able to satisfy this requirement
   if your Text Domain is multiple words (separated by hyphens).

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-message-recommendation-will-cause-php-error%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/plugin-check/assets/icon.svg?rev=3166100)
 * [Plugin Check (PCP)](https://wordpress.org/plugins/plugin-check/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/plugin-check/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/plugin-check/)
 * [Active Topics](https://wordpress.org/support/plugin/plugin-check/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/plugin-check/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/plugin-check/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Anthony Hortin](https://wordpress.org/support/users/ahortin/)
 * Last activity: [5 days, 2 hours ago](https://wordpress.org/support/topic/warning-message-recommendation-will-cause-php-error/)
 * Status: not resolved