Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28186 closed defect (bug) (worksforme)

Error in general-template.php

Reported by: johannesjo's profile johannesjo Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: General Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by ocean90)

The use of (string) is cause of an error to me with php 5.4. Also the documentation of the function is in conflict with the comparison at the beginning of the function, where helper is expected to be a mixed-var-type:

 * Private helper function for checked, selected, and disabled.
 * Compares the first two arguments and if identical marks as $type
 * @since 2.8.0
 * @access private
 * @param mixed $helper One of the values to compare
 * @param mixed $current (true) The other value to compare if not just true
 * @param bool $echo Whether to echo or just return the string
 * @param string $type The type of checked|selected|disabled we are doing
 * @return string html attribute or empty string
function __checked_selected_helper( $helper, $current, $echo, $type ) {
	if ( (string) $helper === (string) $current )

Change History (6)

#1 @johannesjo
10 years ago

  • Severity changed from normal to major
  • Version set to 3.9

#2 @johannesjo
10 years ago

  • Severity changed from major to normal

#3 @ocean90
10 years ago

  • Description modified (diff)

Hello johannesjo,

can you please post the exact error message?

#4 @SergeyBiryukov
10 years ago

Could you provide a piece of code to reproduce the issue?

#5 @MikeHansenMe
10 years ago

  • Keywords reporter-feedback added

#6 @wonderboymusic
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

@johannesjo, reopen if you have steps to reproduce.

Note: See TracTickets for help on using tickets.