Commit 13515d37 authored by Steven Jones's avatar Steven Jones

Issue #1330984 by Steven Jones: Fixed Long list of notices on site verify.

parent 4e8d2be5
......@@ -154,7 +154,7 @@ function hosting_alias_insert($node) {
*/
function hosting_alias_update($node) {
// We need to wipe clean existing aliases if we are not making a new revision
if (!$node->revision) {
if (empty($node->revision)) {
hosting_alias_delete_revision($node);
}
......
......@@ -38,11 +38,11 @@ function hosting_package_instance_sync($rid) {
$instance->rid = $rid;
$instance->package_id = $package['package_id'];
}
$instance->languages = $package['info']['languages'];
$instance->filename = $package['filename'];
$instance->version = ($package['version']) ? $package['version'] : 'Unknown';
$instance->languages = isset($package['info']['languages']) ? $package['info']['languages'] : array();
$instance->filename = isset($package['filename']) ? $package['filename'] : NULL;
$instance->version = isset($package['version']) ? $package['version'] : 'Unknown';
$instance->version_code = hosting_package_instance_version_code($package['version']);
$instance->schema_version = $package['schema_version'];
$instance->schema_version = isset($package['schema_version']) ? $package['schema_version'] : NULL;
if (array_key_exists('status', $package)) {
$instance->status = $package['status'];
}
......
......@@ -370,7 +370,7 @@ function hosting_package_sync(&$data) {
foreach ($data as $plural => $packages) {
$type = _hosting_package_plural_map($plural);
foreach ($packages as $short_name => $file) {
$name = ($file['info']['name']) ? $file['info']['name'] : $short_name;
$name = isset($file['info']['name']) ? $file['info']['name'] : $short_name;
if (!($package = hosting_get_package($short_name))) {
// Create a new package.
$package = new stdClass();
......@@ -386,8 +386,8 @@ function hosting_package_sync(&$data) {
// or when it's a new package.
if (!$package->nid ||
($package->title != $name) ||
($package->description != $file['info']['description']) ||
($package->old_short_name != $file['info']['old_short_name'])) {
(isset($file['info']['description']) && ($package->description != $file['info']['description'])) ||
(isset($file['info']['old_short_name']) && ($package->old_short_name != $file['info']['old_short_name']))) {
$package->title = $name;
$package->description = $file['info']['description'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment