X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions.php;h=5e94c32dc37823142f528d7483cdf75ad553820b;hp=1fd297707c9bc120267ea49e1bb350ff6d5b6714;hb=9d527cf8f2d95f7f58a42cb159f0ffc732f49d39;hpb=51c6ad72422e13bfae559bf116b54baee68cd1e5 diff --git a/inc/extensions.php b/inc/extensions.php index 1fd297707c..5e94c32dc3 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -138,6 +138,21 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr // Is this extension already installed? if (EXT_IS_ACTIVE($ext_name)) return false; + // Is the task id zero? Then we need to auto-fix it here + if ($task_id == 0) { + // Try to find the task + $task_id = DETERMINE_EXTENSION_TASK_ID($ext_name); + + // Still zero and not in dry-run? + if (($task_id == 0) && (!$dry_run)) { + // Then request a bug report + debug_report_bug(sprintf("%s: task_id is still zero after DETERMINE_EXTENSION_TASK_ID(%s)", + __FUNCTION__, + $ext_name + )); + } // END - if + } // END - if + // Init queries INIT_SQLS();