Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#43645 closed defect (bug) (duplicate)

WP 4.9.4 removes !function_exists check for "__" in wp-includes/l10n.php

Reported by: boland Owned by:
Priority: normal Milestone:
Component: I18N Version: 4.9.4
Severity: normal Keywords:
Cc: Focuses:

Description

I ran into this issue while working on a site where WordPress handles the front-end and CakePHP runs in the background to handle some js application outputs.

CakePHP also defines a

__()

translation function in its global scope, removing the

if(!function_exists('__'))

check on the translation function in wp-includes/l10n.php causes a fatal redeclaration error when both system cores are loaded on a request.

Was there a reason this check was removed?

Change History (2)

#1 @SergeyBiryukov
8 years ago

  • Component GeneralI18N
  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Hi @boland, welcome to WordPress Trac! Thanks for the report.

WordPress never checked for __() existence, so it looks like someone had manually edited the core files on your site.

This was previously raised in #41498, let's continue the discussion there.

#2 @boland
8 years ago

Thanks for that clarification @SergeyBiryukov
Turns out another dev had added that conditional check in some recent updates.

Note: See TracTickets for help on using tickets.