Skip to content

Commit

Permalink
Merge 2966359 into 74678cf
Browse files Browse the repository at this point in the history
  • Loading branch information
Djennez committed May 7, 2024
2 parents 74678cf + 2966359 commit f3a3c7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generators/schema/howto.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ private function add_duration( &$data, $attributes ) {
return;
}

$days = empty( $attributes['days'] ) ? 0 : $attributes['days'];
$hours = empty( $attributes['hours'] ) ? 0 : $attributes['hours'];
$minutes = empty( $attributes['minutes'] ) ? 0 : $attributes['minutes'];
$days = \intval( ( $attributes['days'] ?? 0 ) );
$hours = \intval( ( $attributes['hours'] ?? 0 ) );
$minutes = \intval( ( $attributes['minutes'] ?? 0 ) );

if ( ( $days + $hours + $minutes ) > 0 ) {
$data['totalTime'] = \esc_attr( 'P' . $days . 'DT' . $hours . 'H' . $minutes . 'M' );
Expand Down

0 comments on commit f3a3c7d

Please sign in to comment.