X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2Fresultwrapper%2FMssqlResultWrapper.php;h=ba79be14f0f22f4d4768f731208a80e6c040f020;hb=20e65a191541681c05d289efaf4edb20429da73d;hp=4e28397455c8ecd5f044fb58d5b7ad63adb16849;hpb=10d1b7d12b5d097413cd507740c5c71781c2580b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php b/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php index 4e28397455..ba79be14f0 100644 --- a/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php +++ b/includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php @@ -5,8 +5,8 @@ namespace Wikimedia\Rdbms; use stdClass; class MssqlResultWrapper extends ResultWrapper { - /** @var integer|null */ - private $mSeekTo = null; + /** @var int|null */ + private $seekTo = null; /** * @return stdClass|bool @@ -14,10 +14,10 @@ class MssqlResultWrapper extends ResultWrapper { public function fetchObject() { $res = $this->result; - if ( $this->mSeekTo !== null ) { - $result = sqlsrv_fetch_object( $res, 'stdClass', [], - SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo ); - $this->mSeekTo = null; + if ( $this->seekTo !== null ) { + $result = sqlsrv_fetch_object( $res, stdClass::class, [], + SQLSRV_SCROLL_ABSOLUTE, $this->seekTo ); + $this->seekTo = null; } else { $result = sqlsrv_fetch_object( $res ); } @@ -36,10 +36,10 @@ class MssqlResultWrapper extends ResultWrapper { public function fetchRow() { $res = $this->result; - if ( $this->mSeekTo !== null ) { + if ( $this->seekTo !== null ) { $result = sqlsrv_fetch_array( $res, SQLSRV_FETCH_BOTH, - SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo ); - $this->mSeekTo = null; + SQLSRV_SCROLL_ABSOLUTE, $this->seekTo ); + $this->seekTo = null; } else { $result = sqlsrv_fetch_array( $res ); } @@ -70,7 +70,7 @@ class MssqlResultWrapper extends ResultWrapper { } // Unlike MySQL, the seek actually happens on the next access - $this->mSeekTo = $row; + $this->seekTo = $row; return true; } }