You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Dan Hansen (JIRA)" <ji...@apache.org> on 2009/08/27 17:14:59 UTC
[jira] Created: (LOG4PHP-77) LoggerReflectionUtils::setter() should
be defined as a static method
LoggerReflectionUtils::setter() should be defined as a static method
--------------------------------------------------------------------
Key: LOG4PHP-77
URL: https://issues.apache.org/jira/browse/LOG4PHP-77
Project: Log4php
Issue Type: Bug
Components: Code
Reporter: Dan Hansen
Priority: Trivial
PHP throws a warning about LoggerReflectionUtils::setter() being called in the wrong context because it is being called statically, but is defined as a class method. The static keyword needs to be added to the method signature.
Index: LoggerReflectionUtils.php
===================================================================
--- LoggerReflectionUtils.php (revision 806229)
+++ LoggerReflectionUtils.php (working copy)
@@ -139,7 +139,7 @@
* @param string $name
* @param mixed $value
*/
- public function setter($object, $name, $value) {
+ public static function setter($object, $name, $value) {
if (empty($name)) {
return false;
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LOG4PHP-77) LoggerReflectionUtils::setter() should
be defined as a static method
Posted by "Dan Hansen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LOG4PHP-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Hansen updated LOG4PHP-77:
------------------------------
Description:
PHP throws a notice about LoggerReflectionUtils::setter() being called in the wrong context because it is being called statically, but is defined as a class method. The static keyword needs to be added to the method signature.
Index: LoggerReflectionUtils.php
===================================================================
--- LoggerReflectionUtils.php (revision 806229)
+++ LoggerReflectionUtils.php (working copy)
@@ -139,7 +139,7 @@
* @param string $name
* @param mixed $value
*/
- public function setter($object, $name, $value) {
+ public static function setter($object, $name, $value) {
if (empty($name)) {
return false;
}
was:
PHP throws a warning about LoggerReflectionUtils::setter() being called in the wrong context because it is being called statically, but is defined as a class method. The static keyword needs to be added to the method signature.
Index: LoggerReflectionUtils.php
===================================================================
--- LoggerReflectionUtils.php (revision 806229)
+++ LoggerReflectionUtils.php (working copy)
@@ -139,7 +139,7 @@
* @param string $name
* @param mixed $value
*/
- public function setter($object, $name, $value) {
+ public static function setter($object, $name, $value) {
if (empty($name)) {
return false;
}
> LoggerReflectionUtils::setter() should be defined as a static method
> --------------------------------------------------------------------
>
> Key: LOG4PHP-77
> URL: https://issues.apache.org/jira/browse/LOG4PHP-77
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Reporter: Dan Hansen
> Priority: Trivial
>
> PHP throws a notice about LoggerReflectionUtils::setter() being called in the wrong context because it is being called statically, but is defined as a class method. The static keyword needs to be added to the method signature.
> Index: LoggerReflectionUtils.php
> ===================================================================
> --- LoggerReflectionUtils.php (revision 806229)
> +++ LoggerReflectionUtils.php (working copy)
> @@ -139,7 +139,7 @@
> * @param string $name
> * @param mixed $value
> */
> - public function setter($object, $name, $value) {
> + public static function setter($object, $name, $value) {
> if (empty($name)) {
> return false;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (LOG4PHP-77) LoggerReflectionUtils::setter()
should be defined as a static method
Posted by "Christian Grobmeier (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LOG4PHP-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Grobmeier resolved LOG4PHP-77.
----------------------------------------
Resolution: Fixed
Fix Version/s: 2.0
Applied with rv808619
Thanks for the patch!
> LoggerReflectionUtils::setter() should be defined as a static method
> --------------------------------------------------------------------
>
> Key: LOG4PHP-77
> URL: https://issues.apache.org/jira/browse/LOG4PHP-77
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Reporter: Dan Hansen
> Priority: Trivial
> Fix For: 2.0
>
>
> PHP throws a notice about LoggerReflectionUtils::setter() being called in the wrong context because it is being called statically, but is defined as a class method. The static keyword needs to be added to the method signature.
> Index: LoggerReflectionUtils.php
> ===================================================================
> --- LoggerReflectionUtils.php (revision 806229)
> +++ LoggerReflectionUtils.php (working copy)
> @@ -139,7 +139,7 @@
> * @param string $name
> * @param mixed $value
> */
> - public function setter($object, $name, $value) {
> + public static function setter($object, $name, $value) {
> if (empty($name)) {
> return false;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.