com web/rmtools: Fix error mailing: script/pecl.php
| From: | Anatol Belski | Date: | Fri, 03 Nov 2017 08:23:21 +0000 |
| Subject: | com web/rmtools: Fix error mailing: script/pecl.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-26534@lists.php.net to get a copy of this message | ||
Commit: 5042b078dd96639a756a87573e5710588538e910
Author: Anatol Belski <ab@php.net> Fri, 3 Nov 2017 09:23:21 +0100
Parents: 3ac2037b5d55ddd5608a2ed3fe07a99c5955632a
Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=5042b078dd96639a756a87573e5710588538e910
Log:
Fix error mailing
Changed paths:
M script/pecl.php
Diff:
diff --git a/script/pecl.php b/script/pecl.php
index 556e8d7..3b6d4aa 100644
--- a/script/pecl.php
+++ b/script/pecl.php
@@ -154,14 +154,15 @@ foreach ($builds as $build_name) {
if (!$aggregate_mail) {
echo "Mailing info to <$maintainer_mailto>" . PHP_EOL;
}
+ $mail_pkg_name = isset($ext) ? $ext->getPackageName() : basename($pkg_path);
/* Not initialized yet, so no ->getPackageName() */
- if ($mailer) {
+ if (isset($mailer) && $mailer) {
$mailer->xmail(
MAIL_FROM,
/* no chance to have the maintainers mailto at this stage */
$maintainer_mailto,
'[PECL-DEV] Windows build: ' . basename($pkg_path),
- $ext->getPackageName() . " not started\nReason: " . $e->getMessage()
+ $mail_pkg_name . " not started\nReason: " . $e->getMessage()
);
} else {
rm\xmail(
@@ -169,7 +170,7 @@ foreach ($builds as $build_name) {
/* no chance to have the maintainers mailto at this stage */
$maintainer_mailto,
'[PECL-DEV] Windows build: ' . basename($pkg_path),
- $ext->getPackageName() . " not started\nReason: " . $e->getMessage()
+ $mail_pkg_name . " not started\nReason: " . $e->getMessage()
);
}
}