public function get_warnings($context = null) { // Only return a specific contexts errors. if (!empty($context)) { return isset($this->warnings[$context]) ? $this->warnings[$context] : array(); } return $this->warnings; }