In API, the before() method (inherited from Handler) takes a $method
argument, although this is not declared for the before method() in
handler. PHP in strict mode treats this as an error.
Since call sites already pass the $method argument, change
Handler::before() and the before() method in all other subclasses to
take this argument.
class Dlg extends Protected_Handler {
private $param;
- function before() {
- if (parent::before()) {
+ function before($method) {
+ if (parent::before($method)) {
header("Content-Type: text/xml; charset=utf-8");
$this->param = db_escape_string($_REQUEST["param"]);
print "<dlg>";
return true;
}
- function before() {
+ function before($method) {
return true;
}
return array_search($method, $csrf_ignored) !== false;
}
- function before() {
- if (parent::before()) {
+ function before($method) {
+ if (parent::before($method)) {
if ($_SESSION["access_level"] < 10) {
print __("Your access level is insufficient to open this tab.");
return false;
<?php
class Pref_Users extends Protected_Handler {
- function before() {
- if (parent::before()) {
+ function before($method) {
+ if (parent::before($method)) {
if ($_SESSION["access_level"] < 10) {
print __("Your access level is insufficient to open this tab.");
return false;
<?php
class Protected_Handler extends Handler {
- function before() {
- return parent::before() && $_SESSION['uid'];
+ function before($method) {
+ return parent::before($method) && $_SESSION['uid'];
}
}
?>