[geeklog-cvs] geeklog: PHP 5.4 now warns about statically calling non-static m...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Aug 28 11:08:59 EDT 2011


changeset 8384:1ed9a997b564
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/1ed9a997b564
user: Dirk Haun <dirk at haun-online.de>
date: Sun Aug 07 11:15:58 2011 +0200
description:
PHP 5.4 now warns about statically calling non-static methods

diffstat:

 system/classes/config.class.php         |   2 +-
 system/classes/timezoneconfig.class.php |  12 ++++++------
 system/classes/validator.class.php      |   2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diffs (81 lines):

diff -r c174ac6891e4 -r 1ed9a997b564 system/classes/config.class.php
--- a/system/classes/config.class.php	Sun Jul 31 18:09:48 2011 +0200
+++ b/system/classes/config.class.php	Sun Aug 07 11:15:58 2011 +0200
@@ -131,7 +131,7 @@
      *
      *    @return config           The newly created or referenced config object
      */
-    function &get_instance()
+    public static function &get_instance()
     {
         static $instance;
 
diff -r c174ac6891e4 -r 1ed9a997b564 system/classes/timezoneconfig.class.php
--- a/system/classes/timezoneconfig.class.php	Sun Jul 31 18:09:48 2011 +0200
+++ b/system/classes/timezoneconfig.class.php	Sun Aug 07 11:15:58 2011 +0200
@@ -51,7 +51,7 @@
     * @static
     *
     */
-    function setSystemTimeZone($tz = '')
+    public static function setSystemTimeZone($tz = '')
     {
         global $_CONF;
 
@@ -94,7 +94,7 @@
     * @static
     *
     */
-    function setUserTimeZone()
+    public static function setUserTimeZone()
     {
         global $_CONF;
 
@@ -113,7 +113,7 @@
     * @static
     *
     */
-    function getUserTimeZone()
+    public static function getUserTimeZone()
     {
         global $_CONF, $_USER;
 
@@ -147,7 +147,7 @@
     * @static
     *
     */
-    function getTimeZoneDropDown($selected = '', $attributes = array())
+    public static function getTimeZoneDropDown($selected = '', $attributes = array())
     {
         $timezones = TimeZoneConfig::listAvailableTimeZones();
 
@@ -176,7 +176,7 @@
     * @static
     *
     */
-    function listAvailableTimeZones()
+    public static function listAvailableTimeZones()
     {
         $timezones = array();
 
@@ -265,7 +265,7 @@
     * @access   private
     *
     */
-    function _sort_by_timezone($tz1, $tz2)
+    static function _sort_by_timezone($tz1, $tz2)
     {
         $p1 = explode(',', $tz1);
         $p2 = explode(',', $tz2);
diff -r c174ac6891e4 -r 1ed9a997b564 system/classes/validator.class.php
--- a/system/classes/validator.class.php	Sun Jul 31 18:09:48 2011 +0200
+++ b/system/classes/validator.class.php	Sun Aug 07 11:15:58 2011 +0200
@@ -94,7 +94,7 @@
  * @access public
  * @static
  */    
-    function &getInstance() {
+    public static function &getInstance() {
 		static $instance = array();
 
 		if (!$instance) {



More information about the geeklog-cvs mailing list