Fix rowCount

This commit is contained in:
Michael RICOIS 2017-03-15 16:53:42 +01:00
parent 62761b4baa
commit 60a6c7eb67

View File

@ -847,7 +847,7 @@ class Entreprise extends Scores_Ws_Server
}
$tabPays = array();
if ($stmt->count() > 0) {
if ($stmt->rowCount() > 0) {
while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) {
$tabPays[$item->codPays3] = $item->libPays;
}
@ -1077,7 +1077,7 @@ class Entreprise extends Scores_Ws_Server
}
$tabPays = array();
if ($stmt->count() > 0) {
if ($stmt->rowCount() > 0) {
while ($item = $stmt->fetch(\PDO::FETCH_OBJ)) {
$tabPays[$item->codPays3] = $item->libPays;
}
@ -1306,7 +1306,7 @@ class Entreprise extends Scores_Ws_Server
}
}
if ($stmt->count() == 0) {
if ($stmt->rowCount() == 0) {
throw new SoapFault('MSG', 'Aucun résultat');
}