diff --git a/CHANGELOG.md b/CHANGELOG.md
index c2a140c..3de2b69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,11 @@
CHANGELOG
==========================
+## 1.3.8 (`1030870`)
+
+- **Fix:** `XF\Api\Templater` error message when calling API endpoints
+- **Fix:** Inability to save phrases via admin control panel
+
## 1.3.7 (`1030770`)
- **Change:** On XF 2.2.7+ when minifying JS files go with the stock minifier service (#109)
diff --git a/Listener.php b/Listener.php
index d9fdc2e..97289a0 100644
--- a/Listener.php
+++ b/Listener.php
@@ -46,28 +46,31 @@ public static function dispatcherPostRender
/** @var ExtendedTemplater $templater */
$templater = $renderer->getTemplater();
- $permissionErrors = $templater->getPermissionErrors();
-
- if (count($permissionErrors))
+ if (\is_callable([$templater, 'getPermissionErrors']))
{
- $warningHtml = '
Permission errors
';
- foreach ($permissionErrors AS $permissionError)
- {
- $warningHtml .= sprintf('- %s (%s:%d)
',
- htmlspecialchars($permissionError['error']),
- htmlspecialchars(FileUtil::stripRootPathPrefix($permissionError['file'])),
- $permissionError['line']
- );
- }
- $warningHtml .= '
';
+ $permissionErrors = $templater->getPermissionErrors();
- if (strpos($content, '') !== false)
+ if (count($permissionErrors))
{
- $content = str_replace('', $warningHtml . '', $content);
- }
- else
- {
- $content = preg_replace('#]*>#i', "\\0$warningHtml", $content);
+ $warningHtml = 'Permission errors
';
+ foreach ($permissionErrors AS $permissionError)
+ {
+ $warningHtml .= sprintf('- %s (%s:%d)
',
+ htmlspecialchars($permissionError['error']),
+ htmlspecialchars(FileUtil::stripRootPathPrefix($permissionError['file'])),
+ $permissionError['line']
+ );
+ }
+ $warningHtml .= '
';
+
+ if (strpos($content, '') !== false)
+ {
+ $content = str_replace('', $warningHtml . '', $content);
+ }
+ else
+ {
+ $content = preg_replace('#]*>#i', "\\0$warningHtml", $content);
+ }
}
}
}
diff --git a/XF/Admin/Controller/Phrase.php b/XF/Admin/Controller/Phrase.php
index 9590cfc..4d9b956 100644
--- a/XF/Admin/Controller/Phrase.php
+++ b/XF/Admin/Controller/Phrase.php
@@ -56,10 +56,10 @@ public function actionSave(ParameterBag $params)
$db = $this->app()->db();
$db->beginTransaction();
- $reply = parent::actionSave($parameterBag);
+ $reply = parent::actionSave($params);
/** @noinspection PhpUndefinedFieldInspection */
- if (!$parameterBag->phrase_id && $reply instanceof RedirectReply)
+ if (!$params->phrase_id && $reply instanceof RedirectReply)
{
$phrases = $this->filter('phrases', 'array');
if (count($phrases))
diff --git a/addon.json b/addon.json
index 8f4d560..38fc42a 100644
--- a/addon.json
+++ b/addon.json
@@ -2,8 +2,8 @@
"legacy_addon_id": "",
"title": "Developer Tools",
"description": "This add-on provides enhancements for add-on developers.",
- "version_id": 1030770,
- "version_string": "1.3.7",
+ "version_id": 1030870,
+ "version_string": "1.3.8",
"dev": "TickTackk",
"dev_url": "https://xenforo.com/community/members/ticktackk.90375/",
"faq_url": "",