Force use of an int when saving paid amount.
[platal.git] / 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;