[wp-trac] [WordPress Trac] #40501: $version is not defined in editor_js() for TinyMCE

WordPress Trac noreply at wordpress.org
Thu Apr 20 19:16:49 UTC 2017


#40501: $version is not defined in editor_js() for TinyMCE
-----------------------------+-----------------------------
 Reporter:  littler.chicken  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  TinyMCE          |    Version:  trunk
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Whenever I open an admin screen with a post edit field, I get this notice:

 {{{PHP Notice:  Undefined variable: version in ...class-wp-editor.php on
 line 1426}}}

 It appears that `$version` has not been defined for the TinyMCE script in
 the editor_js() method. It looks like other methods in this class call the
 global and then use it to define the version, something like:

 {{{#!php
 global $tinymce_version;
 $version = 'ver=' . $tinymce_version;
 }}}

 If I add these two lines to the method, the notice is fixed. I know that
 the TinyMCE component was updated just this week but didn't see a ticket
 on this variable.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40501>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list