Changeset 59471
- Timestamp:
- 11/28/2024 10:50:21 PM (3 days ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r59461 r59471 595 595 596 596 // The day of the week from the timestamp. 597 $weekday = gmdate( 'w', $day );597 $weekday = (int) gmdate( 'w', $day ); 598 598 599 599 if ( ! is_numeric( $start_of_week ) ) { 600 $start_of_week = get_option( 'start_of_week' );600 $start_of_week = (int) get_option( 'start_of_week' ); 601 601 } 602 602 … … 610 610 // $start + 1 week - 1 second. 611 611 $end = $start + WEEK_IN_SECONDS - 1; 612 612 613 return compact( 'start', 'end' ); 613 614 } -
trunk/src/wp-includes/general-template.php
r59419 r59471 2374 2374 2375 2375 // See how much we should pad in the beginning. 2376 $pad = calendar_week_mod( gmdate( 'w', $unixmonth ) - $week_begins );2376 $pad = calendar_week_mod( (int) gmdate( 'w', $unixmonth ) - $week_begins ); 2377 2377 if ( 0 != $pad ) { 2378 2378 $calendar_output .= "\n\t\t" . '<td colspan="' . esc_attr( $pad ) . '" class="pad"> </td>'; … … 2413 2413 $calendar_output .= '</td>'; 2414 2414 2415 if ( 6 == calendar_week_mod( gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ) ) {2415 if ( 6 == calendar_week_mod( (int) gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ) ) { 2416 2416 $newrow = true; 2417 2417 } 2418 2418 } 2419 2419 2420 $pad = 7 - calendar_week_mod( gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins );2420 $pad = 7 - calendar_week_mod( (int) gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ); 2421 2421 if ( 0 != $pad && 7 != $pad ) { 2422 2422 $calendar_output .= "\n\t\t" . '<td class="pad" colspan="' . esc_attr( $pad ) . '"> </td>';
Note: See TracChangeset
for help on using the changeset viewer.