Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#17206 closed defect (bug) (fixed)

Deprecating wp_clone() causes some BC Issues

Reported by: technosailor Owned by: technosailor
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:


Notably, with the W3 Total Cache plugin. Normally, I'd say we shouldn't worry too much about plugin compatibility, but considering the widespread use of this particular one, we should consider ensuring compatibility.

I've not paid too close attention to the process of deprecation and keeping code BC. Happy to write this patch with some guidance/feedback though.

Errors from logs below for context:

[Thu Apr 21 12:53:11 2011] [error] [client] PHP Fatal error: Call to undefined function wp_clone() in /nas/wp/www/sites/aaronbrazell/wp-content/plugins/w3-total-cache/lib/W3/ObjectCache.php on line 223

Attachments (1)

17206.diff (1.2 KB) - added by technosailor 10 years ago.
Moves deprecated wp_clone() function back to load.php

Download all attachments as: .zip

Change History (10)

#1 @technosailor
10 years ago

  • Keywords reporter-feedback removed

#3 @duck_
10 years ago

We could move it back to load.php and leave as deprecated. I doubt we want to suddenly start loading it later as it was probably early for a reason.

#4 @technosailor
10 years ago

I'm okay with this. Not really sure what the point of deprecating it was anyway, besides dropping PHP4 compat.

#5 @ryan
10 years ago

  • Milestone changed from Awaiting Review to 3.2

It was loaded early for just this reason. I moved it to deprecated.php after auditing a bunch of object caches and not seeing any uses of wp_clone(). I obviously forgot this one. Let's put it back in load.php and leave as deprecated, as suggested by duck_.

#6 @technosailor
10 years ago

  • Owner set to technosailor
  • Status changed from new to accepted

10 years ago

Moves deprecated wp_clone() function back to load.php

#7 @nacin
10 years ago

  • Keywords has-patch added

#8 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [17681]) Move wp_clone() back to load.php. Props technosailor. fixes #17206

#9 @nacin
10 years ago

In [18293]:

Avoid _deprecated_function() in wp_clone(). An object cache gets loaded before i18n functions exist. Maybe a better solution in 3.3. see #17206.

Note: See TracTickets for help on using tickets.