* @since 2.1.0
*
* @param string|int $code Optional. Error code.
- * @return mixed Null, if no errors.
+ * @return mixed Error data, if it exists.
*/
public function get_error_data($code = '') {
if ( empty($code) )
if ( isset($this->error_data[$code]) )
return $this->error_data[$code];
- return null;
}
/**