Page MenuHomePhorge

D25435.1734770608.diff
No OneTemporary

D25435.1734770608.diff

diff --git a/src/utils/PhutilCowsay.php b/src/utils/PhutilCowsay.php
--- a/src/utils/PhutilCowsay.php
+++ b/src/utils/PhutilCowsay.php
@@ -71,14 +71,15 @@
$template);
}
- $template = preg_replace_callback(
- '/\\$([a-z]+)/',
- array($this, 'replaceTemplateVariable'),
- $template);
- if ($template === false) {
- throw new Exception(
- pht(
- 'Failed to replace template variables while rendering cow!'));
+ foreach (array('/\\$([a-z]+)/', '/\\${([a-z]+)}/') as $token_pattern) {
+ $template = preg_replace_callback(
+ $token_pattern,
+ array($this, 'replaceTemplateVariable'),
+ $template);
+ if ($template === false) {
+ throw new Exception(
+ pht('Failed to replace template variables while rendering cow!'));
+ }
}
$lines = $this->text;

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 08:43 (17 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1024295
Default Alt Text
D25435.1734770608.diff (867 B)

Event Timeline