Description: Add compatibility for PHP 5.4 using error_reporting(E_ALL)
Author: Dario Minnucci <midget@debian.org>
Last-Update: 2012-04-27
Index: php-validate/Validate-0.8.5/Validate.php
===================================================================
--- php-validate.orig/Validate-0.8.5/Validate.php	2012-04-27 04:06:26.192038726 +0200
+++ php-validate/Validate-0.8.5/Validate.php	2012-04-27 04:14:25.052951330 +0200
@@ -216,7 +216,7 @@
      *
      * @access private
      */
-    function __uriRFC4151($uri)
+    private static function __uriRFC4151($uri)
     {
         $datevalid = false;
         if (preg_match(
@@ -257,7 +257,7 @@
      *
      * @access public
      */
-    function number($number, $options = array())
+    public static function number($number, $options = array())
     {
         $decimal = $dec_prec = $min = $max = null;
         if (is_array($options)) {
@@ -295,7 +295,7 @@
      *
      * @access  private
      */
-    function __stringToUtf7($string)
+    private static function __stringToUtf7($string)
     {
         $return = '';
         $utf7   = array(
@@ -373,7 +373,7 @@
      *
      * @access private
      */
-    function __emailRFC822(&$email, &$options)
+    private static function __emailRFC822(&$email, &$options)
     {
         static $address   = null;
         static $uncomment = null;
@@ -442,7 +442,7 @@
      *
      * @return bool True if validating succeeds
      */
-    function _fullTLDValidation($email, $options)
+    private static function _fullTLDValidation($email, $options)
     {
         $validate = array();
         if(!empty($options["VALIDATE_ITLD_EMAILS"])) array_push($validate, 'itld');
@@ -481,7 +481,7 @@
      *
      * @return true or false (Depending on if it validates or if it does not)
      */
-    function executeFullEmailValidation($email, $arrayOfTLDs)
+    public static function executeFullEmailValidation($email, $arrayOfTLDs)
     {
         $emailEnding = explode('.', $email);
         $emailEnding = $emailEnding[count($emailEnding)-1];
@@ -516,7 +516,7 @@
      *
      * @access public
      */
-    function email($email, $options = null)
+    public static function email($email, $options = null)
     {
         $check_domain = false;
         $use_rfc822   = false;
@@ -608,7 +608,7 @@
      *
      * @access public
      */
-    function string($string, $options)
+    public static function string($string, $options)
     {
         $format     = null;
         $min_length = 0;
@@ -670,7 +670,7 @@
      *
      * @access public
      */
-    function uri($url, $options = null)
+    public static function uri($url, $options = null)
     {
         $strict = ';/?:@$,';
         $domain_check = false;
@@ -746,7 +746,7 @@
      *
      * @access public
      */
-    function date($date, $options)
+    public static function date($date, $options)
     {
         $max    = false;
         $min    = false;
@@ -929,7 +929,7 @@
      * @access private
      * @return string
      */
-    function _substr(&$date, $num, $opt = false)
+    private static function _substr(&$date, $num, $opt = false)
     {
         if ($opt && strlen($date) >= $opt && preg_match('/^[0-9]{'.$opt.'}/', $date, $m)) {
             $ret = $m[0];
@@ -940,7 +940,7 @@
         return $ret;
     }
 
-    function _modf($val, $div)
+    private static function _modf($val, $div)
     {
         if (function_exists('bcmod')) {
             return bcmod($val, $div);
@@ -993,7 +993,7 @@
      *
      * @return  int -1 calculated control number is returned
      */
-    function _getControlNumber($number, &$weights, $modulo = 10, $subtract = 0, $allow_high = false)
+    private static function _getControlNumber($number, &$weights, $modulo = 10, $subtract = 0, $allow_high = false)
     {
         // calc sum
         $sum = Validate::_multWeights($number, $weights);
@@ -1023,7 +1023,7 @@
      *
      * @return  bool true if valid, false if not
      */
-    function _checkControlNumber($number, &$weights, $modulo = 10, $subtract = 0)
+    private static function _checkControlNumber($number, &$weights, $modulo = 10, $subtract = 0)
     {
         if (strlen($number) < count($weights)) {
             return false;
@@ -1060,7 +1060,7 @@
      *
      * @access public
      */
-    function multiple(&$data, &$val_type, $remove = false)
+    public static function multiple(&$data, &$val_type, $remove = false)
     {
         $keys  = array_keys($data);
         $valid = array();
@@ -1131,11 +1131,11 @@
      *
      * @param string $filename file to search for
      *
-     * @access private
+     * @access public
      *
      * @return bool true if file exists
      */
-    function _includePathFileExists($filename)
+    private static function _includePathFileExists($filename)
     {
         $paths = explode(":", ini_get("include_path"));
         $result = false;
