* Not a holistic solution, but these are the places that currently
assume a natural number for $page.
Bug: T100453
Change-Id: Ic611e5379dc8d138034b62ff8d678dfc68ced023
* @return int
*/
public function getWidth( $page = 1 ) {
+ $page = (int)$page;
+ if ( $page < 1 ) {
+ $page = 1;
+ }
+
$this->load();
if ( $this->isMultipage() ) {
* @return int
*/
public function getHeight( $page = 1 ) {
+ $page = (int)$page;
+ if ( $page < 1 ) {
+ $page = 1;
+ }
+
$this->load();
if ( $this->isMultipage() ) {
* @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;