From 28875c63b8bb2235f5dd5d33f0a8b2c8a63bd5d5 Mon Sep 17 00:00:00 2001 From: rurban Date: Sat, 29 Jan 2005 20:41:47 +0000 Subject: [PATCH] some minor php5 strictness fixes git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4481 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/main.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/main.php b/lib/main.php index 9f223baf6..30de3104f 100644 --- a/lib/main.php +++ b/lib/main.php @@ -1,5 +1,5 @@ _user) and isset($this->_user->_group)) return $this->_user->_group; - else - return WikiGroup::getGroup(); + else { + // Debug Strict: Only variable references should be returned by reference + $this->_user->_group = WikiGroup::getGroup(); + return $this->_user->_group; + } } function & getPrefs () { @@ -1108,8 +1111,16 @@ TODO: check against these cases: } //FIXME: deprecated +/* +Debug Strict: F:\prog\php\phpwiki-dev\phpwiki\lib\HtmlElement.php line 415 - Non-static method HTML::_setTagProperty() should not be called statically +Debug Strict: F:\prog\php\phpwiki-dev\phpwiki\lib\HtmlElement.php line 432 - Non-static method HTML::_setTagProperty() should not be called statically +Debug Strict: F:\prog\php\phpwiki-dev\phpwiki\lib\HtmlElement.php line 442 - Non-static method HTML::_setTagProperty() should not be called statically +Debug Strict: F:\prog\php\phpwiki-dev\phpwiki\lib\WikiDB.php line 119 - Creating default object from empty value +Debug Strict: F:\prog\php\phpwiki-dev\phpwiki\lib\main.php line 1112 - Non-static method WikiRequest::requiredAuthorityForAction() should not be called statically +*/ function is_safe_action ($action) { - return WikiRequest::requiredAuthorityForAction($action) < WIKIAUTH_ADMIN; + global $request; + return $request->requiredAuthorityForAction($action) < WIKIAUTH_ADMIN; } function validateSessionPath() { @@ -1235,6 +1246,9 @@ if (!defined('PHPWIKI_NOMAIN') or !PHPWIKI_NOMAIN) // $Log: not supported by cvs2svn $ +// Revision 1.204 2005/01/25 07:35:42 rurban +// add TODO comment +// // Revision 1.203 2005/01/21 14:11:23 rurban // better moderation class tag // -- 2.45.0