diff --git a/www/install/php/Update-2.8.19_to_2.8.20.php b/www/install/php/Update-2.8.19_to_2.8.20.php
index aea5f32a491ef92549e4c4312abe42811aac6781..f0389d490af73e9efee7c2aa5dcadb4ca693e5d1 100644
--- a/www/install/php/Update-2.8.19_to_2.8.20.php
+++ b/www/install/php/Update-2.8.19_to_2.8.20.php
@@ -38,7 +38,7 @@
 if (isset($pearDB)) {
     $res = $pearDB->query("SELECT `name` FROM `nagios_server` WHERE `is_default` = 1");
 
-    if( $res->rowCount() == 0) {
+    if ($pearDB->numberRows() == 0) {
         $res = $pearDB->query("UPDATE `nagios_server` SET `is_default` = 1 WHERE `localhost` = '1'");
     }
 }