Modify

Ticket #271 (closed defect: duplicate)

Opened 3 years ago

Last modified 3 years ago

Warning on iterating over empty keys

Reported by: silfreed@… Owned by: 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

comment:1 Changed 3 years ago by mrook

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #265.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.