Changeset View
Changeset View
Standalone View
Standalone View
src/xsprintf/xsprintf.php
Context not available. | |||||
$arg = 0; | $arg = 0; | ||||
$pos = 0; | $pos = 0; | ||||
$pattern = $argv[0]; | $pattern = $argv[0]; | ||||
$len = strlen($pattern); | $len = @strlen($pattern); | ||||
$conv = false; // Are we inside a conversion? | $conv = false; // Are we inside a conversion? | ||||
for ($pos = 0; $pos < $len; $pos++) { | for ($pos = 0; $pos < $len; $pos++) { | ||||
Context not available. | |||||
if ($conv) { | if ($conv) { | ||||
// We could make a greater effort to support formatting modifiers, | // We could make a greater effort to support formatting modifiers, | ||||
// but they really have no place in semantic string formatting. | // but they really have no place in semantic string formatting. | ||||
if (strpos("'-0123456789.\$+", $c) !== false) { | if (@strpos("'-0123456789.\$+", $c) !== false) { | ||||
throw new InvalidArgumentException( | throw new InvalidArgumentException( | ||||
pht( | pht( | ||||
'%s does not support the "%s" modifier.', | '%s does not support the "%s" modifier.', | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0