diff --git a/model/PFAHandler.php b/model/PFAHandler.php index a7ea3fc3..169b88af 100644 --- a/model/PFAHandler.php +++ b/model/PFAHandler.php @@ -33,18 +33,18 @@ abstract class PFAHandler { * @var string (default) name of the database table * (can be overridden by $CONF[database_prefix] and $CONF[database_tables][*] via table_by_key()) */ - protected $db_table = null; + protected $db_table; /** * @var string field containing the ID */ - protected $id_field = null; + protected $id_field; /** * @var string field containing the label * defaults to $id_field if not set */ - protected $label_field = null; + protected $label_field; /** * field(s) to use in the ORDER BY clause @@ -52,7 +52,7 @@ abstract class PFAHandler { * defaults to $id_field if not set * @var string */ - protected $order_by = null; + protected $order_by; /** * @var string @@ -896,7 +896,7 @@ abstract class PFAHandler { } /** - * @return return value of previously called method + * @return mixed return value of previously called method */ public function result() { return $this->result; diff --git a/model/Shell.php b/model/Shell.php index 84a3f838..3f5141e4 100644 --- a/model/Shell.php +++ b/model/Shell.php @@ -36,7 +36,8 @@ class Shell { * @var object * @access public */ - public $Dispatch = null; + public $Dispatch; + /** * If true, the script will ask for permission to perform actions. * @@ -64,28 +65,28 @@ class Shell { * @var string * @access public */ - public $shell = null; + public $shell; /** * The class name of the shell that was invoked. * * @var string * @access public */ - public $className = null; + public $className; /** * The command called if public methods are available. * * @var string * @access public */ - public $command = null; + public $command; /** * The name of the shell in camelized. * * @var string * @access public */ - public $name = null; + public $name; /** * Constructs this Shell instance. diff --git a/model/VacationHandler.php b/model/VacationHandler.php index d8a9d3af..c9ed41d2 100644 --- a/model/VacationHandler.php +++ b/model/VacationHandler.php @@ -199,18 +199,18 @@ class VacationHandler extends PFAHandler { $boolean = ($row['active'] == db_get_boolean(true)); # TODO: only return true and store the db result array in $this->whatever for consistency with the other classes return array( - 'subject' => $row['subject'], - 'body' => $row['body'], - 'active' => $boolean , - 'interval_time' => $row['interval_time'], - 'activeFrom' => $row['activefrom'], - 'activeUntil' => $row['activeuntil'], + 'subject' => isset($row['subject']) ? $row['subject'] : null, + 'body' => isset($row['body']) ? $row['body'] : null, + 'active' => $boolean, + 'interval_time' => isset($row['interval_time']) ? $row['interval_time'] : null, + 'activeFrom' => isset($row['activefrom']) ? $row['activefrom'] : null, + 'activeUntil' => isset($row['activeuntil']) ? $row['activeuntil'] : null ); } /** * @param string $subject * @param string $body - * @param string $interval_time + * @param int $interval_time * @param string $activeFrom - something strtotime understands * @param string $activeUntil - something strtotime understands * @return boolean