[Resolved] [PATCH] undefined variable 'rtl'
With WP_DEBUG turned on I’m getting the warning
Notice: Undefined variable: rtl in /path/to/wp-content/plugins/revisionary/admin/agents_checklist_rvy.php on line 269
when loading the edit post page.
This is caused by you defining the following inside an if block then using it outside of that block so the variable isn’t always present:
$rtl = ( isset($wp_locale) && ('rtl' == $wp_locale->text_direction) );
The solution is pretty simple. Move the lines
global $wp_locale; $rtl = ( isset($wp_locale) && ('rtl' == $wp_locale->text_direction) );
to the top of the _agents_checklist_display method just above
$args = array_merge( $defaults, (array) $args );
- The topic ‘[Resolved] [PATCH] undefined variable 'rtl'’ is closed to new replies.