[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 03/05: Fix error
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 03/05: Fix error |
Date: |
Sun, 26 Feb 2017 09:06:04 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 3dc36a79cdce0e8bb2347e1e0b2092d4999af402
Author: Dany De Bontridder <address@hidden>
Date: Thu Feb 16 12:56:15 2017 +0100
Fix error
---
include/lib/ac_common.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index bf3ff46..c5db73b 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -566,6 +566,11 @@ function getPeriodeName($p_cn, $p_id, $pos='p_start')
echo_error('lib/ac_common.php' . "-" . __LINE__ . ' UNDEFINED
PERIODE');
throw new Exception(_("paramètre invalide"));
}
+ if ( isNumber($p_id) == 0 )
+ {
+ throw new Exception("Paramètre invalide");
+ return;
+ }
$ret = $p_cn->get_value("select to_char($pos,'Mon YYYY') as t from
parm_periode where p_id=$1",
array( $p_id));
return $ret;