summaryrefslogtreecommitdiff
path: root/classes/pluginhandler.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-23 22:26:07 +0300
committerAndrew Dolgov <[email protected]>2021-02-23 22:26:07 +0300
commit8d2e3c2528e67f8650c122f014364a34bf690d2a (patch)
treefd44203c8a5919848f689cb6caa8c0c8d0784d54 /classes/pluginhandler.php
parent37d46411c77bda2b1823f7d230b06e36b7125a8d (diff)
drop errors.php and simplify error handling
Diffstat (limited to 'classes/pluginhandler.php')
-rw-r--r--classes/pluginhandler.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/pluginhandler.php b/classes/pluginhandler.php
index 608f80dcb..75b823822 100644
--- a/classes/pluginhandler.php
+++ b/classes/pluginhandler.php
@@ -15,15 +15,15 @@ class PluginHandler extends Handler_Protected {
$plugin->$method();
} else {
user_error("Rejected ${plugin_name}->${method}(): invalid CSRF token.", E_USER_WARNING);
- print error_json(6);
+ print Errors::to_json(Errors::E_UNAUTHORIZED);
}
} else {
user_error("Rejected ${plugin_name}->${method}(): unknown method.", E_USER_WARNING);
- print error_json(13);
+ print Errors::to_json(Errors::E_UNKNOWN_METHOD);
}
} else {
user_error("Rejected ${plugin_name}->${method}(): unknown plugin.", E_USER_WARNING);
- print error_json(14);
+ print Errors::to_json(Errors::E_UNKNOWN_PLUGIN);
}
}
}