Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
zendframework/zendframework#6545 - UpperCaseWords should ignore non…
Browse files Browse the repository at this point in the history
…-string values
  • Loading branch information
Ocramius committed Jan 1, 2015
1 parent 016b84f commit 0d2f87e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UpperCaseWords.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public function __construct($encodingOrOptions = null)
*
* Returns the string $value, converting words to have an uppercase first character as necessary
*
* If the value provided is non-scalar, the value will remain unfiltered
* If the value provided is not a string, the value will remain unfiltered
*
* @param string|mixed $value
* @return string|mixed
*/
public function filter($value)
{
if (!is_scalar($value)) {
if (! is_string($value)) {
return $value;
}

Expand Down

0 comments on commit 0d2f87e

Please sign in to comment.