openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 437dac153d24d4db84c247f6b660bf7bdc89ddfb
parent 864ddfb849fd9725e363c688b77255a7480382c4
Author: dankert <devnull@localhost>
Date:   Wed, 23 Dec 2009 23:57:06 +0100

Nicht initialisierte Variablen nicht benutzen.

Diffstat:
objectClasses/Language.class.php | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/objectClasses/Language.class.php b/objectClasses/Language.class.php @@ -100,12 +100,15 @@ class Language $sql->setInt( 'languageid',$this->languageid ); $row = $db->getRow( $sql ); - - $this->name = $row['name' ]; - $this->isoCode = $row['isocode' ]; - $this->projectid = intval( $row['projectid'] ); - $this->isDefault = ( $row['is_default'] == '1' ); + if ( count($row) > 0 ) + { + $this->name = $row['name' ]; + $this->isoCode = $row['isocode' ]; + $this->projectid = intval( $row['projectid'] ); + + $this->isDefault = ( $row['is_default'] == '1' ); + } }