Hi,
I'm getting this really weird error:
Fatal error: Exception thrown without a stack frame in Unknown on line 0.
I don't exactly know what causes this error, but i have some ideas.
This is the part of the code where i think the error appears (i don't know exactly where because of the 'Unknown on line 0').
public function fetchAssocArray($query, $params, $array_index = '')
{
$query_result = pg_query_params($this->connection, $query, $params);
$this->errorCheck();
$return_array = array();
while($row = pg_fetch_assoc($query_result))
{
if ($array_index != '' && isset ( $row [ $array_index ] ))
{
$return_array [ $row [ $array_index ] ] = $row;
}
else
{
$return_array [] = $row ;
}
}
$this->errorCheck () ;
return $return_array ;
}
The pg_query_params() function generates an error, because the syntax of the query is incorrect. The function calls errorCheck(), which looks like this:
public function errorCheck()
{
if ($this->connection)
{
if (pg_last_error($this->connection))
{
throw new DbException("Database Error: " . pg_last_error($this->connection)) ;
}
}
else
{
throw new DbConnectionException("No connection created") ;
}
}
Somehow this generates the error: Fatal error: Exception thrown without a stack frame in Unknown on line 0. This is not related to this PHP bug, since i have no destructor in my class.
Thanks in advance.