Release plat/al core v1.1.13
[platal.git] / classes / s.php
index d436bf1..e741e8a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -56,8 +56,8 @@ class S
 
     public static function i($key, $default = 0)
     {
-        $i = S::v($key, $default);
-        return is_numeric($i) ? intval($i) : $default;
+        $i = to_integer(S::v($key, $default));
+        return $i === false ? $default : $i;
     }
 
     public static function t($key, $default = '')
@@ -191,5 +191,5 @@ class S
     }
 }
 
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
 ?>