From e604ad4231a127ae417dc7bfcf300af3ca69a016 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 23 Jul 2007 11:52:02 +0000 Subject: eliminated internal_error() --- db_record.class | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'db_record.class') diff --git a/db_record.class b/db_record.class index 9470df7..a716117 100644 --- a/db_record.class +++ b/db_record.class @@ -239,7 +239,7 @@ function update($tags) $this->_write_pre_process($tags); if ($this->key == "") - internal_error("it_db_record::update(): can't update undefined record"); + it::fatal("it_db_record::update(): can't update undefined record"); /* If we have nothing to do, return instead of performing an invalid SQL query */ if (!count($tags)) @@ -265,7 +265,7 @@ function update($tags) if ($ti[0] == $this->key) { if ($this->data[$this->keyfieldname] != $ti[0]) - internal_error("$sql: trying to change key from $this->key."); + it::fatal("$sql: trying to change key from $this->key."); } $this->data[$ti[0]] = $ti[1]; @@ -296,7 +296,7 @@ function delete($key="") if (!$key) $key = $this->key; if (($this->table->name == "") || ($this->keyfieldname == "") || ($key == "")) - internal_error("it_db_record::delete(): no record\n"); + it::fatal("it_db_record::delete(): no record\n"); $sql = "DELETE FROM " . $this->table->name . " WHERE ". $this->keyfieldname . "='" . mysql_real_escape_string($key) . "'"; if ($result = $this->table->db->sql_query($sql)) @@ -320,9 +320,9 @@ function safe_get_field($field) { if (isset($this->data[$field])) return $this->data[$field]; - else internal_error("it_db_record::safe_get_field(): field \"$field\" not present in record."); + else it::fatal("it_db_record::safe_get_field(): field \"$field\" not present in record."); } - else internal_error("it_db_record::safe_get_field(): empty field name"); + else it::fatal("it_db_record::safe_get_field(): empty field name"); } -- cgit v1.2.3