Commit:    2c2853af16306e57f77898f7c8f6ee35ea511b0e
Author:    Anatol Belski <[email protected]>         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;
+               }
        }
 }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to