title: PHP Fatal error: Declaration of ... must be compatible with
body: <p>I can´t find the problem. This code works over years, but after reset the server this fatal-error was displayed. Maybe you can help me. Thank you</p>
  
  <blockquote>
    <p>PHP Fatal error:  Declaration of styBoxLoadEventArgs::__construct()
    must be compatible with EventArgs::__construct() in
    .../modules/sty/events/styBoxLoadEventArgs.php  on line 4</p>
  </blockquote>
  
  <p>the code is:</p>
  
  <pre><code>&lt;?php
  
  class styBoxLoadEventArgs extends EventArgs
  {
      public $hide = false;
      public $box;
  
      public function __construct($box)
      {
          $this-&gt;box = $box;
      }
  }
  ?&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>here is the code of the EventArgs</strong></p>
  
  <pre><code>?php
  
  /**
   * EventArgs
   */
  abstract class EventArgs
  {
  
      public $sender, $senderClass, $senderObject, $event;
      protected $items;
  
      /**
       * Creates new EventArgs object
       */
      abstract public function __construct();
  
      /**
       * Returns specified item
       * 
       * @param   string      item-name
       * @return  mixed
       */
      public function __get($_name)
      {
          if(!array_key_exists($_name, $this-&gt;items)) 
          {
              throw new BasicException("Item '" . $_name . "' not found");
          }
  
          return $this-&gt;items[$_name];
      }
  
      /**
       * Sets specified item
       * 
       * @param   string      item-name 
       * @param   mixed       value
       */
      public function __set($_name, $_value)
      {
          if(!array_key_exists($_name, $this-&gt;items))
          {
              throw new BasicException("Item '" . $_name . "' not found");
          }
  
          $this-&gt;items[$_name] = $_value;
      }
  
      public function &amp;GetByRef($_key)
      {
          if(!array_key_exists($_key, $this-&gt;items))
          {
              throw new BasicException("Item '" . $_key . "' not found");
          }
  
          return $this-&gt;items[$_key];
      }
  
  }
  </code></pre>