Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-4

Fatal error for constructor in LoggerAppenderRollingFile

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None
    • PHP Version 5.2.1

    Description

      Log4php triggers a fatal error while creating an instance of LoggerAppenderRollingFile.
      The error occurs due to calling the non-existent php4 constructor in parent class LoggerAppenderFile.

      Error message:
      Fatal error: Call to undefined method LoggerAppenderRollingFile::LoggerAppenderFile() in log4php/appenders/LoggerAppenderRollingFile.php on line 80

      Patch:

      Index: appenders/LoggerAppenderRollingFile.php
      ===================================================================
      — appenders/LoggerAppenderRollingFile.php (revision 12)
      +++ appenders/LoggerAppenderRollingFile.php (working copy)
      @@ -75,11 +75,11 @@
      *

      • @param string $name appender name
        */
      • function LoggerAppenderRollingFile($name)
        + public function __construct($name) { - $this->LoggerAppenderFile($name); + parent::__construct($name); }

        -
        +
        /**

      • Returns the value of the MaxBackupIndex option.
      • @return integer

      Attachments

        1. LoggerAppenderRollingFile.php.patch
          0.6 kB
          Michael Aichler

        Activity

          People

            kurdalen Knut Urdalen
            micha Michael Aichler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment