Force use of an int when saving paid amount.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 3 Jun 2012 15:47:40 +0000 (17:47 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 3 Jun 2012 15:47:42 +0000 (17:47 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
modules/xnetevents.php

index 041c8c0..f99a4b6 100644 (file)
@@ -611,6 +611,12 @@ class XnetEventsModule extends PLModule
                                   $member->uid, $evt['eid']);
 
                 $paid = $res->fetchOneCell();
+
+                // Ensure we have an integer
+                if ($paid == null) {
+                    $paid = 0;
+                }
+
                 $nbs  = Post::v('nb', array());
 
                 $paid_inserted = false;