Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40501 closed defect (bug) (fixed)

$version is not defined in editor_js() for TinyMCE

Reported by: littlerchicken's profile littler.chicken Owned by: azaozz's profile azaozz
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.8
Component: TinyMCE Keywords:
Focuses: Cc:

Description

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:

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.

Change History (2)

#1 @azaozz
7 years ago

  • Milestone changed from Awaiting Review to 4.8

Related #35760.

Yeah, missed that. Thanks for the bug report.

#2 @azaozz
7 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 40515:

Editor: fix undefined var notice in editor_js() in class-wp-editor.php.

Props littler.chicken.
Fixes #40501, see #35760.

Note: See TracTickets for help on using tickets.