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
PHP Fatal error: Declaration of styBoxLoadEventArgs::__construct() must be compatible with EventArgs::__construct() in .../modules/sty/events/styBoxLoadEventArgs.php on line 4
the code is:
<?php
class styBoxLoadEventArgs extends EventArgs
{
public $hide = false;
public $box;
public function __construct($box)
{
$this->box = $box;
}
}
?>
here is the code of the EventArgs
?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->items))
{
throw new BasicException("Item '" . $_name . "' not found");
}
return $this->items[$_name];
}
/**
* Sets specified item
*
* @param string item-name
* @param mixed value
*/
public function __set($_name, $_value)
{
if(!array_key_exists($_name, $this->items))
{
throw new BasicException("Item '" . $_name . "' not found");
}
$this->items[$_name] = $_value;
}
public function &GetByRef($_key)
{
if(!array_key_exists($_key, $this->items))
{
throw new BasicException("Item '" . $_key . "' not found");
}
return $this->items[$_key];
}
}