Skip to content

Commit 605f852

Browse files
committed
ucwords polyfill for php 5.5
1 parent b7a6473 commit 605f852

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Qiniu/functions.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,13 @@ function explodeUpToken($upToken)
279279
return array($accessKey, $bucket, null);
280280
}
281281

282-
// polyfill ucwords for php version < 5.4.32
283-
if (version_compare(phpversion(), "5.4.32") < 0) {
282+
// polyfill ucwords for `php version < 5.4.32` or `5.5.0 <= php version < 5.5.16`
283+
if (version_compare(phpversion(), "5.4.32") < 0 ||
284+
(
285+
version_compare(phpversion(), "5.5.0") >= 0 &&
286+
version_compare(phpversion(), "5.5.16") < 0
287+
)
288+
) {
284289
function ucwords($str, $delimiters = " \t\r\n\f\v")
285290
{
286291
$delims = preg_split('//u', $delimiters, -1, PREG_SPLIT_NO_EMPTY);

0 commit comments

Comments
 (0)