summaryrefslogtreecommitdiff
path: root/classes/api.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-09 08:57:23 +0300
committerAndrew Dolgov <[email protected]>2021-02-09 08:57:23 +0300
commit6a25bc53efd7804a1c8e1777cf1938880983501e (patch)
tree5c778f47a5c226a33cef194f12c69e20df840386 /classes/api.php
parent3655e7aaf1cc714e716c71c41c5f02bdf5e528d3 (diff)
api: pass hook object payload by reference
Diffstat (limited to 'classes/api.php')
-rwxr-xr-xclasses/api.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/api.php b/classes/api.php
index 342ad54cc..d7036189a 100755
--- a/classes/api.php
+++ b/classes/api.php
@@ -352,7 +352,7 @@ class API extends Handler {
$article["content"] = $line["content"];
}
- $hook_object = ["article" => $article];
+ $hook_object = ["article" => &$article];
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_API,
function ($result) use (&$article) {
@@ -785,7 +785,7 @@ class API extends Handler {
$headline_row["note"] = $line["note"];
$headline_row["lang"] = $line["lang"];
- $hook_object = ["headline" => $headline_row];
+ $hook_object = ["headline" => &$headline_row];
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_API,
function ($result) use (&$headline_row) {