Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#17206 closed defect (bug) (fixed)

Deprecating wp_clone() causes some BC Issues

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

Description

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 24.35.200.175] 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 14 years ago.
Moves deprecated wp_clone() function back to load.php

Download all attachments as: .zip

Change History (10)

#1 @technosailor
14 years ago

  • Keywords reporter-feedback removed

#3 @duck_
14 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
14 years ago

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

#5 @ryan
14 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
14 years ago

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

@technosailor
14 years ago

Moves deprecated wp_clone() function back to load.php

#7 @nacin
14 years ago

  • Keywords has-patch added

#8 @ryan
14 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
14 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.