Ticket #271 (closed defect: duplicate)

Opened 4 months ago

Last modified 3 months ago

Warning on iterating over empty keys

Reported by: silfreed@silfreed.net Assigned to: hans
Priority: major Milestone: 2.3.1
Component: phing-core Version: 2.3.1RC1
Keywords: Cc:

Description

Line 317 of Phing.php has a loop over argument keys. When the args are empty, the warning below is issued.

Attached is a patch that resolves the issue by not iterating over an empty argument list.

Aug 27 09:23:00  [warning] max(): Array must contain at least one element (/path/to/pear/phing/Phing.php at line 317)
====backtrace ====                                                                  
#0  max() called at [/path/to/pear/phing/Phing.php:317] args{Array}                                                  
#1  Phing->execute() called at [/path/to/pear/phing/Phing.php:157] args{Array}                                       
#2  Phing::start() called at [/path/to/pear/phing/Phing.php:270] args{Array, }                                       
#3  Phing::fire() called at [/path/to/phingcmd.php:40] args{Array}

Attachments

Change History

10/06/08 15:42:52 changed by mrook

  • status changed from new to closed.
  • resolution set to duplicate.

Duplicate of #265.


Add/Change #271 (Warning on iterating over empty keys)




Action