Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#16903 closed enhancement (fixed)

PHP5-Port - Superfluous code in _deep_replace()

Reported by: hakre's profile hakre Owned by: dd32's profile dd32
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Formatting Keywords:
Focuses: Cc:

Description

Since PHP 5.0.0 the count parameter was added, see str_replace.

(in earlier PHP 4.x versions, arrays were already supported)

Attachments (1)

16903.patch (1.2 KB) - added by hakre 14 years ago.
$count FTW

Download all attachments as: .zip

Change History (7)

@hakre
14 years ago

$count FTW

#1 @hakre
14 years ago

  • Keywords has-patch added
  • Type changed from defect to enhancement

Patch contains the short version of that function. Tested.

#2 @hakre
14 years ago

Related: #16906

#3 @c3mdigital
11 years ago

  • Keywords close added; has-patch removed
  • Resolution set to maybelater
  • Status changed from new to closed

#4 @SergeyBiryukov
11 years ago

  • Component changed from General to Formatting
  • Keywords has-patch added; close removed
  • Milestone Awaiting Review deleted

#5 @dd32
11 years ago

  • Keywords has-patch removed
  • Milestone set to 3.7
  • Resolution maybelater deleted
  • Status changed from closed to reopened

#6 @dd32
11 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from reopened to closed

In 25054:

Simplify _deep_replace() by removing it's obscure looping and replacement checking logic, and instead, using the PHP5 $count parameter of str_replace(). Props hakre. Fixes #16903

Note: See TracTickets for help on using tickets.