svn: /pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/ Commands.php

From: Date: Wed, 08 Sep 2010 23:18:33 +0000
Subject: svn: /pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/ Commands.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9649@lists.php.net to get a copy of this message
clockwerx Wed, 08 Sep 2010 23:18:33 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303182 Log: Bug #17834 Pyrus: PHP Notice: Undefined variable: package Bug: http://pear.php.net/bugs/17834 (unknown) Changed paths: U pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/Commands.php Modified: pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/Commands.php =================================================================== --- pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/Commands.php 2010-09-08 21:58:39 UTC (rev 303181) +++ pear2/Pyrus_Developer/trunk/src/Pyrus/Developer/PackageFile/Commands.php 2010-09-08 23:18:33 UTC (rev 303182) @@ -138,7 +138,7 @@ function package($frontend, $args, $options) { - $package1 = false; + $package = false; if (!isset($args['packagexml'])) { // first try ./package.xml if (file_exists('package.xml')) { @@ -148,11 +148,14 @@ if ($e->getCode() != -3) { throw $e; } - if (file_exists('package2.xml')) { - $package = new \PEAR2\Pyrus\Package(getcwd() . DIRECTORY_SEPARATOR . 'package2.xml'); - // now the creator knows to do the magic of package2.xml/package.xml - $package->thisIsOldAndCrustyCompatible(); + + if (!file_exists('package2.xml')) { + throw $e; } + + $package = new \PEAR2\Pyrus\Package(getcwd() . DIRECTORY_SEPARATOR . 'package2.xml'); + // now the creator knows to do the magic of package2.xml/package.xml + $package->thisIsOldAndCrustyCompatible(); } } } else {

« previous php.pear.core (#9649) next »