Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Started running a debugger for hostmaster, found a few missing 'isset's so I patched it.
diff --git a/modules/hosting/hosting.features.inc b/modules/hosting/hosting.features.inc
index 112e951..7fc7716 100644
--- a/modules/hosting/hosting.features.inc
+++ b/modules/hosting/hosting.features.inc
@@ -34,7 +34,7 @@ function hosting_feature($feature) {
if (!sizeof($features)) {
$features = hosting_get_features();
}
- if ($features[$feature]['module']) {
+ if (isset($features[$feature]['module'])) {
$return = (module_exists($features[$feature]['module'])) ? HOSTING_FEATURE_ENABLED : HOSTING_FEATURE_DISABLED;
}
else {
diff --git a/modules/hosting/task/hosting_task.module b/modules/hosting/task/hosting_task.module
index 3772b81..5c7f695 100644
--- a/modules/hosting/task/hosting_task.module
+++ b/modules/hosting/task/hosting_task.module
@@ -1143,10 +1143,10 @@ function hosting_task_fetch_tasks($rid) {
$task = array_merge($return[$type], $hook_task);
$allowed = (isset($task['exists']) && !in_array($task['task_status'], array(HOSTING_TASK_QUEUED, HOSTING_TASK_PROCESSING))) ||
- if ($allowed && !$task['hidden'] && $access_callback($node, $type)) {
+ if ($allowed && !isset($task['hidden']) && $access_callback($node, $type)) {
$task['task_permitted'] = TRUE;
}
- $task['class'] = hosting_task_status_class($task['task_status']);
+ $task['class'] = hosting_task_status_class(isset($task['task_status'])? $task['task_status']: null);
$return[$type] = $task;
}
Comment | File | Size | Author |
---|---|---|---|
#3 | phpnotices-1855486-3.patch | 4.12 KB | Jon Pugh |
#1 | phpnotices-1855486.patch | 1.43 KB | Jon Pugh |
Comments
Comment #1
Jon Pughattached
Comment #2
Deciphered CreditAttribution: Deciphered commentedComment #3
Jon PughFound many more.
Comment #4
Deciphered CreditAttribution: Deciphered commentedDoesn't meet Drupal coding standards
Comment #5
Steven Jones CreditAttribution: Steven Jones commented@Jon Pugh Thanks very much for the patch, applied and cleanup up in 6.x-2.x.
Comment #6
Steven Jones CreditAttribution: Steven Jones commentedActually this required some extra work in this patch
Comment #7.0
(not verified) CreditAttribution: commentedUpdating patch code