Page MenuHomePhorge

D25435.1726879827.diff
No OneTemporary

D25435.1726879827.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, Sep 21, 00:50 (19 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
893523
Default Alt Text
D25435.1726879827.diff (867 B)

Event Timeline