The attached patch addresses the following PHP warnings seen during initial install of Aegir:

During "site-verify" for Aegir hostmaster site:

Undefined property: stdClass::$task_args hosting_task.module:572
Undefined property: stdClass::$db_passwd hosting_db_server.module:52
Undefined index: db hosting_server.module:170
Undefined property: stdClass::$revision hosting_server.module:316
Undefined property: stdClass::$task_args hosting_task.module:548
Undefined variable: additions hosting_client.module:882

During "server-verify" for "localhost":

Undefined property: stdClass::$task_args hosting_task.module:572
Undefined property: stdClass::$db_passwd hosting_db_server.module:52
Undefined index: http hosting_server.module:170
Undefined property: stdClass::$revision hosting_server.module:316

During "site-import" for Aegir hostmaster site:

Undefined variable: additions hosting_client.module:882
Undefined property: stdClass::$task_args hosting_task.module:572
Undefined property: stdClass::$revision hosting_site.nodeapi.inc:168
Undefined property: stdClass::$revision hosting_package.module:265
Undefined index: gid hosting_client.access.inc:239

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Steven Jones’s picture

Status: Needs review » Needs work

Thanks for this, I've added most of your changes from the patch, tidying up as I went, but I've not added the hunk for hosting_package_sync as in theory that code doesn't need to be called by Drush, and also because we can safely assume that we are called with an array. It is the responsibility of the calling code to pass us an array and not some random junk.

There are going to be a lot more places in Aegir that need an isset or !empty adding...the codebase is quite crufty in some places.

Steven Jones’s picture

Status: Needs work » Fixed

Marking as fixed as all the usable code got committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 11924c9 on 7.x-2.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by GuyPaddock, committed by Steven Jones:
    Issue #1273554: Fixes Clean-up for multiple warnings.
    
    

  • Commit 11924c9 on 7.x-2.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x authored by GuyPaddock, committed by Steven Jones:
    Issue #1273554: Fixes Clean-up for multiple warnings.