From 66d2152ab57b1267552c75243919945b1ffc49bb Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sun, 04 Mar 2012 02:59:46 -0500
Subject: [PATCH] Exclude E_STRICT from error_reporting for PHP 5.4

---
 CHANGELOG                          |    1 +
 program/include/html.php           |    9 +++------
 program/lib/PEAR.php               |    2 +-
 program/include/iniset.php         |    2 +-
 program/include/rcube_charset.php  |    2 +-
 program/include/rcube_contacts.php |    2 +-
 6 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 78c1f78..7f3cd7b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Exclude E_STRICT from error_reporting for PHP 5.4
 - Copy all skins in installto script (#1488376)
 - Prevent from folder selection on virtual folder collapsing (#1488346)
 
diff --git a/program/include/html.php b/program/include/html.php
index d4c925c..27da2c3 100644
--- a/program/include/html.php
+++ b/program/include/html.php
@@ -335,10 +335,6 @@
         if ($attrib['type']) {
             $this->type = $attrib['type'];
         }
-
-        if ($attrib['newline']) {
-            $this->newline = true;
-        }
     }
 
     /**
@@ -381,11 +377,12 @@
  * @package HTML
  */
 
-class html_hiddenfield extends html_inputfield
+class html_hiddenfield extends html
 {
+    protected $tagname = 'input';
     protected $type = 'hidden';
     protected $fields_arr = array();
-    protected $newline = true;
+    protected $allowed = array('type','name','value','onchange','disabled','readonly');
 
     /**
      * Constructor
diff --git a/program/include/iniset.php b/program/include/iniset.php
index 375bdf6..5feca7d 100644
--- a/program/include/iniset.php
+++ b/program/include/iniset.php
@@ -68,7 +68,7 @@
     die("Fatal error: ini_set/set_include_path does not work.");
 }
 
-ini_set('error_reporting', E_ALL&~E_NOTICE);
+ini_set('error_reporting', E_ALL &~ (E_NOTICE | E_STRICT));
 
 // increase maximum execution time for php scripts
 // (does not work in safe mode)
diff --git a/program/include/rcube_charset.php b/program/include/rcube_charset.php
index e52e82e..7e8fe49 100644
--- a/program/include/rcube_charset.php
+++ b/program/include/rcube_charset.php
@@ -78,7 +78,7 @@
      * @param  int    Level of the error
      * @param  string Error message
      */
-    public function error_handler($errno, $errstr)
+    public static function error_handler($errno, $errstr)
     {
         throw new ErrorException($errstr, 0, $errno);
     }
diff --git a/program/include/rcube_contacts.php b/program/include/rcube_contacts.php
index 11fbde0..c30751f 100644
--- a/program/include/rcube_contacts.php
+++ b/program/include/rcube_contacts.php
@@ -883,7 +883,7 @@
      * @param string New name to set for this group
      * @return boolean New name on success, false if no data was changed
      */
-    function rename_group($gid, $newname)
+    function rename_group($gid, $newname, &$new_gid)
     {
         // make sure we have a unique name
         $name = $this->unique_groupname($newname);
diff --git a/program/lib/PEAR.php b/program/lib/PEAR.php
index 8cc7152..f4dfd96 100644
--- a/program/lib/PEAR.php
+++ b/program/lib/PEAR.php
@@ -263,7 +263,7 @@
      * @access  public
      * @return  bool    true if parameter is an error
      */
-    function isError($data, $code = null)
+    static function isError($data, $code = null)
     {
         if (!is_object($data) || !is_a($data, 'PEAR_Error')) {
             return false;

--
Gitblit v1.9.1