fix namespace for dbh

This commit is contained in:
Isaac Connor 2015-12-21 11:10:45 -05:00
parent 2548ec3bc0
commit e7c337f9f3
1 changed files with 3 additions and 3 deletions

View File

@ -80,10 +80,10 @@ sub load {
my $type = ref $self;
if ( ! $data ) {
#$log->debug("Object::load Loading from db $type");
$data = $ZoneMinder::dbh->selectrow_hashref( 'SELECT * FROM Storage WHERE Id=?', {}, $$self{Id} );
$data = $ZoneMinder::Database::dbh->selectrow_hashref( 'SELECT * FROM Storage WHERE Id=?', {}, $$self{Id} );
if ( ! $data ) {
if ( $ZoneMinder::dbh->errstr ) {
Error( "Failure to load Storage record for $$self{id}: Reason: " . $ZoneMinder::dbh->errstr );
if ( $ZoneMinder::Database::dbh->errstr ) {
Error( "Failure to load Storage record for $$self{id}: Reason: " . $ZoneMinder::Database::dbh->errstr );
} # end if
} # end if
} # end if ! $data