Merge "Move section ID fallbacks into headers themselves"
[lhc/web/wiklou.git] / includes / filerepo / file / UnregisteredLocalFile.php
index 5ee25cd..cdad5fc 100644 (file)
@@ -111,6 +111,11 @@ class UnregisteredLocalFile extends File {
         * @return bool
         */
        private function cachePageDimensions( $page = 1 ) {
+               $page = (int)$page;
+               if ( $page < 1 ) {
+                       $page = 1;
+               }
+
                if ( !isset( $this->dims[$page] ) ) {
                        if ( !$this->getHandler() ) {
                                return false;
@@ -166,8 +171,8 @@ class UnregisteredLocalFile extends File {
        }
 
        /**
-       * @return int
-       */
+        * @return int
+        */
        function getBitDepth() {
                $gis = $this->getImageSize( $this->getLocalRefPath() );