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

cPanel: Undefined property error when cpanel_domain not set

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0-b1
    • Component/s: Modules
    • Labels:
      None

      Description

      In cPanel, it's possible to receive an "Undefined property: stdClass::domain" error.

      See https://www.blesta.com/forums/index.php?/topic/13624-error-adding-product-to-basket-cpanel-module/

      It looks like cPanel::getClientAddFields should check whether all input $vars properties exist before attempting to use them. In this case, it appears there is an expression:

      $this->Html->ifSet($vars->cpanel_domain, $vars->domain),
      

      ... that should also check whether $vars->domain is set, e.g.:

      $this->Html->ifSet($vars->cpanel_domain, $this->Html->ifSet($vars->domain)),
      

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.9.0 Sprint 6 [ 104 ]
        tyson Tyson Phillips (Inactive) made changes -
        Assignee Tyson Phillips [ tyson ]
        tyson Tyson Phillips (Inactive) made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        tyson Tyson Phillips (Inactive) made changes -
        Summary cPanel: Possible undefined property error cPanel: Undefined property error when cpanel_domain not set
        Automated transition triggered when Tyson Phillips (Inactive) created pull request #27 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 10 minutes [ 600 ]
        Worklog Id 13274 [ 13274 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 10 minutes [ 600 ] 15 minutes [ 900 ]
        Worklog Id 13277 [ 13277 ]
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #27 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              31/Mar/20

              Time Tracking

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

                Agile