From: Nick Jenkins Date: Tue, 9 Jan 2007 09:51:53 +0000 (+0000) Subject: One more E_STRICT warning tweak for http://192.168.0.64/wiki/index.php?action=ajax... X-Git-Tag: 1.31.0-rc.0~54553 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=351452fab32b7ce2459e9a945bfd7e777b69b8d3;p=lhc%2Fweb%2Fwiklou.git One more E_STRICT warning tweak for 192.168.0.64/wiki/index.php?action=ajax (i.e. no 'rs' argument supplied) : * Strict Standards: Undefined index: rs in includes/AjaxDispatcher.php on line 38 Q: Should / could the AjaxDispatcher constructor maybe be using the $wgRequest global instead of accessing $_POST and $_GET directly? --- diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 89062f8770..1f41a83f70 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -28,14 +28,14 @@ class AjaxDispatcher { } if ($this->mode == "get") { - $this->func_name = $_GET["rs"]; + $this->func_name = isset( $_GET["rs"] ) ? $_GET["rs"] : ''; if (! empty($_GET["rsargs"])) { $this->args = $_GET["rsargs"]; } else { $this->args = array(); } } else { - $this->func_name = $_POST["rs"]; + $this->func_name = isset( $_POST["rs"] ) ? $_POST["rs"] : ''; if (! empty($_POST["rsargs"])) { $this->args = $_POST["rsargs"]; } else {