Plugin Directory

Changeset 3440087


Ignore:
Timestamp:
01/15/2026 07:36:03 AM (3 months ago)
Author:
sofyansitorus
Message:

Fix deprecated implicit float-to-int conversion in get_text_of_duration for hours and minutes calculation

Location:
wcsdm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wcsdm/tags/3.0.4/legacy/classes/class-wcsdm-legacy-shipping-method.php

    r3440081 r3440087  
    19831983
    19841984        /*** Hours */
    1985         $hours = intval( ( intval( $duration ) / 3600 ) % 24 );
     1985        $hours = (int) ( ( $duration / 3600 ) % 24 );
    19861986
    19871987        if ( $hours > 0 ) {
     
    19911991
    19921992        /*** Minutes */
    1993         $minutes = intval( ( intval( $duration ) / 60 ) % 60 );
     1993        $minutes = (int) ( ( $duration / 60 ) % 60 );
    19941994
    19951995        if ( $minutes > 0 ) {
  • wcsdm/trunk/legacy/classes/class-wcsdm-legacy-shipping-method.php

    r3440081 r3440087  
    19831983
    19841984        /*** Hours */
    1985         $hours = intval( ( intval( $duration ) / 3600 ) % 24 );
     1985        $hours = (int) ( ( $duration / 3600 ) % 24 );
    19861986
    19871987        if ( $hours > 0 ) {
     
    19911991
    19921992        /*** Minutes */
    1993         $minutes = intval( ( intval( $duration ) / 60 ) % 60 );
     1993        $minutes = (int) ( ( $duration / 60 ) % 60 );
    19941994
    19951995        if ( $minutes > 0 ) {
Note: See TracChangeset for help on using the changeset viewer.