Title: Change Variable fix
Last modified: August 21, 2016

---

# Change Variable fix

 *  Resolved [Bryan Willis](https://wordpress.org/support/users/codecandid/)
 * (@codecandid)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/change-variable-fix/)
 * Right after line 50 you need to add add the following:
 * `$img = '';`
 * Plugin throws errors because $img only shows on versions less than 3.8 so it 
   never gets defined on versions greater than 3.8, but is called regardless. Adding
   an empty array should be an ok quick fix.
 * So it should go something like this:
 *     ```
       if (floatval($wp_ver) >= 3.8) {
       		$title = '<span class="ab-icon"></span><span class="ab-label">Edit Pages</span>';
                       $img = '';
       	} else {
       		$title = '<span class="ab-icon"><img src="'. BS_ABEP_PATH . '/images/edit-page-icon.png" /></span><span class="ab-label">Edit Pages</span>';
       		$img = '_no_dashicon';
       	}
       ```
   
 * Alternatives could be to wrap the whole if then in a function, return the content
   instead of using variables and then just call the function directly. Isset would
   work too, but the method above seems like the easiest/quickest.
 * [https://wordpress.org/plugins/admin-bar-edit-page-links/](https://wordpress.org/plugins/admin-bar-edit-page-links/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Brett Shumaker](https://wordpress.org/support/users/brettshumaker/)
 * (@brettshumaker)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/change-variable-fix/#post-4991904)
 * Thanks…I forgot to subscribe to the support forum on this plugin.
 * This is fixed in 1.04

Viewing 1 replies (of 1 total)

The topic ‘Change Variable fix’ is closed to new replies.

 * ![](https://ps.w.org/admin-bar-edit-page-links/assets/icon-256x256.png?rev=1104388)
 * [Admin Bar Edit Content Links](https://wordpress.org/plugins/admin-bar-edit-page-links/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-bar-edit-page-links/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-bar-edit-page-links/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-bar-edit-page-links/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-bar-edit-page-links/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-bar-edit-page-links/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Brett Shumaker](https://wordpress.org/support/users/brettshumaker/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/change-variable-fix/#post-4991904)
 * Status: resolved