public function __construct($id, $row = null, $object = null) { if ($id !== null) { $sql = "SELECT *\n\t\t\t\t\tFROM " . static::getDatabaseTableName() . "\n\t\t\t\t\tWHERE (" . static::getDatabaseTableIndexName() . " = ?)"; $statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array($id)); $row = $statement->fetchArray(); if ($row === false) { $row = array(); } } parent::__construct(null, $row, $object); }
/** * @see \wcf\data\DatabaseObject::handleData() */ protected function handleData($data) { parent::handleData($data); $this->data['contentData'] = @unserialize($this->data['contentData']); if (!is_array($this->data['contentData'])) { $this->data['contentData'] = array(); } }