com web/rmtools: do not init the mailer if no aggregate option given: client/script/pecl.php

From: Date: Mon, 30 Sep 2013 11:48:49 +0000
Subject: com web/rmtools: do not init the mailer if no aggregate option given: client/script/pecl.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-19136@lists.php.net to get a copy of this message
Commit: 2c2853af16306e57f77898f7c8f6ee35ea511b0e Author: Anatol Belski <ab@php.net> Mon, 30 Sep 2013 13:48:49 +0200 Parents: 4fd43b3a11bf6c052006f97e957cf0cd96375a33 Branches: master Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=2c2853af16306e57f77898f7c8f6ee35ea511b0e Log: do not init the mailer if no aggregate option given Changed paths: M client/script/pecl.php Diff: diff --git a/client/script/pecl.php b/client/script/pecl.php index 1140917..992b9ae 100644 --- a/client/script/pecl.php +++ b/client/script/pecl.php @@ -75,14 +75,16 @@ if ($is_first_run) { echo PHP_EOL; echo "First invocation for <$pkg_path> started." . PHP_EOL . PHP_EOL; - try { - /* Not sure it's needed anymore, but let it persist */ - $mailer = new rm\PeclMail($pkg_path, $aggregate_mail); - $mailer->saveState(); - unset($mailer); - } catch (Exception $e) { - echo 'Error: ' . $e->getMessage() . PHP_EOL; - $was_errors = true; + if ($aggregate_mail) { + try { + /* Not sure it's needed anymore, but let it persist */ + $mailer = new rm\PeclMail($pkg_path, $aggregate_mail); + $mailer->saveState(); + unset($mailer); + } catch (Exception $e) { + echo 'Error: ' . $e->getMessage() . PHP_EOL; + $was_errors = true; + } } }

« previous php.webmaster (#19136) next »