Add an "editor" extension type
[lhc/web/wiklou.git] / includes / WebRequest.php
index 26e2d45..fa8f84d 100644 (file)
@@ -269,6 +269,8 @@ class WebRequest {
         * @since 1.27
         */
        public static function getRequestId() {
+               // This method is called from various error handlers and should be kept simple.
+
                if ( !self::$reqId ) {
                        self::$reqId = isset( $_SERVER['UNIQUE_ID'] )
                                ? $_SERVER['UNIQUE_ID'] : wfRandomString( 24 );
@@ -430,7 +432,7 @@ class WebRequest {
         * selected by a drop-down menu). For freeform input, see getText().
         *
         * @param string $name
-        * @param string $default Optional default (or null)
+        * @param string|null $default Optional default (or null)
         * @return string|null
         */
        public function getVal( $name, $default = null ) {
@@ -780,6 +782,8 @@ class WebRequest {
         * @return string
         */
        public static function getGlobalRequestURL() {
+               // This method is called on fatal errors; it should not depend on anything complex.
+
                if ( isset( $_SERVER['REQUEST_URI'] ) && strlen( $_SERVER['REQUEST_URI'] ) ) {
                        $base = $_SERVER['REQUEST_URI'];
                } elseif ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] )