Skip to content

Commit 0920fe3

Browse files
author
Daniel Kinzler
committed
return size as int
git-svn-id: https://svn.toolserver.org/svnroot/daniel/duesenstuff/trunk/gpClient@564 9f2c43bc-b3c0-43f4-b155-41619b16f219
1 parent 7caf43c commit 0920fe3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

php/gpMediaWiki.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,10 @@ public function remove_page_id( $id ) {
465465

466466
public function size() { #TODO: port to python
467467
$sql = "SELECT count(*) FROM " . $this->table;
468-
return $this->glue->mysql_query_value($sql);
468+
$v = $this->glue->mysql_query_value($sql);
469+
470+
if ( $v || $v === "0" ) $v = (int)$v;
471+
return $v;
469472
}
470473

471474
public function strip_namespace( $ns, $inverse = false ) {

0 commit comments

Comments
 (0)