PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Console » Console_Getargs » Bug #8643

Providing strings as min/max values gives weird results

Details

Submitted2006-09-06 12:12 UTC
Fromhering at luck-n-load dot de
Assignedscottmattocks
StatusClosed
PackageConsole_Getargs
PHP Version5.1.4
OSLinux/Debian 3.1
Roadmaps(Not assigned)

Comments

[2006-09-06 12:12 UTC] hering at luck-n-load dot de

Description:
------------
If you define any of the values for min/max as strings like this 'max' => '1' instead of 'max' => 1 you get strange results, especially when using switches with no min definition and a max definition of 0 (or in this case '0'). I know you should provide them as integers, but i think this is something what could be solved by casting to an integer, or mentioning it in the documentation.