/** * Basically, this is a wrapper for the WebRequest wasPosted function that * won't give us notices if we weren't even a web request. * I realize this is pretty lame. * Notices, however, are more lame. * @staticvar string $posted Keeps track so we don't have to figure it out twice. */ public function wasPosted() { static $posted = null; if ($posted === null) { $posted = array_key_exists('REQUEST_METHOD', $_SERVER) && WmfFramework::isPosted(); } return $posted; }