Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-5246

Support Manager: Reduce deprecated notices for PHP 8.1+

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.10.0
    • Fix Version/s: 5.11.0
    • Component/s: Plugins
    • Labels:
      None

      Description

      On PHP 8.1+ there is a deprecated notice written to ../logs_blesta/, like the following:

      [2024-08-22T17:16:07.468000+00:00] general.NOTICE: E_DEPRECATED: Implicit conversion from float 307.25444444444446 to int loses precision

      Unknown macro: {"code"}

      [2024-08-22T17:16:07.468335+00:00] general.NOTICE: E_DEPRECATED: Implicit conversion from float 18435.266666666666 to int loses precision

      Unknown macro: {"code"}

      To reproduce, simply visit Support > Tickets with at least 1 ticket visible.

      Possible solution:

          $hours_since = (int) ($time/$hour)%24; // Number of hours since
          $mins_since = (int) ($time/60)%60; // Number of mins since
      

        Activity

        admin Paul Phillips created issue -
        admin Paul Phillips made changes -
        Field Original Value New Value
        Description On PHP 8.1+ there is a deprecated notice written to ../logs_blesta/, like the following:

        {quote}[2024-08-22T17:16:07.468000+00:00] general.NOTICE: E_DEPRECATED: Implicit conversion from float 307.25444444444446 to int loses precision {"code":8192,"message":"Implicit conversion from float 307.25444444444446 to int loses precision","file":"/home/user/public_html/511dev/plugins/support_manager/support_manager_controller.php","line":64}
        [2024-08-22T17:16:07.468335+00:00] general.NOTICE: E_DEPRECATED: Implicit conversion from float 18435.266666666666 to int loses precision {"code":8192,"message":"Implicit conversion from float 18435.266666666666 to int loses precision","file":"/home/user/public_html/511dev/plugins/support_manager/support_manager_controller.php","line":65}
        {quote}

        To reproduce, simply visit Support > Tickets with at least 1 ticket visible.
        On PHP 8.1+ there is a deprecated notice written to ../logs_blesta/, like the following:

        {quote}[2024-08-22T17:16:07.468000+00:00] general.NOTICE: E_DEPRECATED: Implicit conversion from float 307.25444444444446 to int loses precision {"code":8192,"message":"Implicit conversion from float 307.25444444444446 to int loses precision","file":"/home/user/public_html/511dev/plugins/support_manager/support_manager_controller.php","line":64}
        [2024-08-22T17:16:07.468335+00:00] general.NOTICE: E_DEPRECATED: Implicit conversion from float 18435.266666666666 to int loses precision {"code":8192,"message":"Implicit conversion from float 18435.266666666666 to int loses precision","file":"/home/user/public_html/511dev/plugins/support_manager/support_manager_controller.php","line":65}
        {quote}

        To reproduce, simply visit Support > Tickets with at least 1 ticket visible.

        Possible solution:


        {code:java}
            $hours_since = (int) ($time/$hour)%24; // Number of hours since
            $mins_since = (int) ($time/60)%60; // Number of mins since
        {code}

          People

          • Assignee:
            Unassigned
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: