HomePhabricator

CodeReview: Fixed some errors I introduced in r62954 (thanks nikerabbit).

Authored by HappyDog.

Description

CodeReview: Fixed some errors I introduced in r62954 (thanks nikerabbit).

  • $cacheSize != "all" didn't work due to type conversion, so it now uses !==. I also force the supplied argument to lower-case to make it case-insensitive (which actually negates the need for !==, but there you go).
  • Changed the is_numeric() check to use a regex to match a string of digits (i.e. a positive integer or zero), as is_numeric() allows through all kinds of weird input.
  • The later check for ($cacheSize != 0) was incorrect because "all" would be type-cast to 0. It now uses !== instead.

Details

Committed
HappyDogFeb 26 2010, 1:58 PM
Parents
rECRE5d182d717f38: Fixed backwards logic mistake (r62914)
Branches
Unknown
Tags
Unknown
ChangeId
None