Remove Notice

This commit is contained in:
Michael RICOIS 2017-03-28 14:10:10 +02:00
parent 4b1a9d694d
commit 0fd0b918d0

View File

@ -208,8 +208,10 @@ class Metier_Liens_Base
$sql = "SELECT LPAD(siren, 9, 0) AS siren FROM jo.liensRef WHERE id = :id";
$stmt = $this->conn->prepare($sql);
$stmt->bindValue('id', $this->idRef);
$result = $stmt->fetch(\PDO::FETCH_OBJ);
$siren = $result->siren;
if ($stmt->rowCount() > 0) {
$result = $stmt->fetch(\PDO::FETCH_OBJ);
$siren = $result->siren;
}
} else {
$siren = $this->siren;
}