X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FAjaxDispatcher.php;h=91422385a2254499c0269082abb1079751a86d9d;hb=ce3a0d7ffad905bc04dcb6a0031a404e2fcc1cc8;hp=96892d710f9e81de1f67bc18fefb0b858c8834b7;hpb=f873b499650ef5d27570f9cb96d01d1477f9e089;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index 96892d710f..91422385a2 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -74,7 +74,7 @@ class AjaxDispatcher { if ( !empty( $_GET["rsargs"] ) ) { $this->args = $_GET["rsargs"]; } else { - $this->args = array(); + $this->args = []; } break; case 'post': @@ -82,7 +82,7 @@ class AjaxDispatcher { if ( !empty( $_POST["rsargs"] ) ) { $this->args = $_POST["rsargs"]; } else { - $this->args = array(); + $this->args = []; } break; default: @@ -135,6 +135,9 @@ class AjaxDispatcher { $result = new AjaxResponse( $result ); } + // Make sure DB commit succeeds before sending a response + wfGetLBFactory()->commitMasterChanges( __METHOD__ ); + $result->sendHeaders(); $result->printText();