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

Entering an invalid date when changing a service renew date results in an exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.0.4
    • Component/s: Staff Interface
    • Labels:
      None

      Description

      When changing a renew date for a service as a staff member, and entering an invalid date, an exception is thrown.

      To reproduce, click to Manage a clients service from their profile page. Under Actions, select "Change Renew Date". Enter something like "2021-04-45" and save.

      The following error is written to the logs and a white page is dispalyed.

      [2021-03-30T18:25:07.762501+00:00] general.ERROR: Exception: DateTime::_construct(): Failed to parse time string (2021-04-45) at position 9 (5): Unexpected character in /home/blestau/public_html/501/vendors/minphp/date/src/Date.php:459 Stack trace: #0 /home/blestau/public_html/501/vendors/minphp/date/src/Date.php(459): DateTime->_construct('2021-04-45', Object(DateTimeZone)) #1 /home/blestau/public_html/501/vendors/minphp/date/src/Date.php(217): Minphp\Date\Date->dateTime('2021-04-45', Object(DateTimeZone)) #2 /home/blestau/public_html/501/app/app_model.php(0): Minphp\Date\Date->format('Y-m-d H:i:s', '2021-04-45') #3 /home/blestau/public_html/501/app/controllers/admin_clients.php(5620): AppModel->dateToUtc('2021-04-45') #4 /home/blestau/public_html/501/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminClients->editService() #5 /home/blestau/public_html/501/index.php(21): Dispatcher::dispatch('/501/admin/clie...') #6

      {main}

        Activity

        admin Paul Phillips created issue -
        admin Paul Phillips made changes -
        Field Original Value New Value
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.1.0 Sprint 3 [ 127 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 36 minutes [ 2160 ]
        Worklog Id 14835 [ 14835 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Apr/21

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 36 minutes
              36m

                Agile