MWException: Log stack traces for php errors (not exceptions)
[lhc/web/wiklou.git] / includes / MediaWiki.php
index 545a46f..7ce6d1b 100644 (file)
@@ -121,7 +121,7 @@ class MediaWiki {
         * @return Title
         */
        public function getTitle() {
-               if ( $this->context->getTitle() === null ) {
+               if ( !$this->context->hasTitle() ) {
                        $this->context->setTitle( $this->parseTitle() );
                }
                return $this->context->getTitle();
@@ -446,7 +446,7 @@ class MediaWiki {
                        $this->triggerJobs();
                        $this->restInPeace();
                } catch ( Exception $e ) {
-                       MWExceptionHandler::handle( $e );
+                       MWExceptionHandler::handleException( $e );
                }
        }
 
@@ -682,7 +682,7 @@ class MediaWiki {
                }
 
                $url = wfAppendQuery( wfScript( 'index' ), $query );
-               $req = "POST $url HTTP/1.1\r\nHost: {$info['host']}\r\nConnection: Close\r\n\r\n";
+               $req = "POST $url HTTP/1.1\r\nHost: {$info['host']}\r\nConnection: Close\r\nContent-Length: 0\r\n\r\n";
 
                wfDebugLog( 'runJobs', "Running $n job(s) via '$url'\n" );
                // Send a cron API request to be performed in the background.