Jelajahi Sumber

fixed bug in ProcesHelper::getZasobTableInfoByUri

Piotr Labudda 8 tahun lalu
induk
melakukan
16aa9005e2
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      SE/se-lib/ProcesHelper.php

+ 2 - 1
SE/se-lib/ProcesHelper.php

@@ -366,7 +366,7 @@ class ProcesHelper {
 		if ('default_db' === $dbName) {
 		if ('default_db' === $dbName) {
 			$dbName = DB::getPDO()->getDatabaseName();
 			$dbName = DB::getPDO()->getDatabaseName();
 		}
 		}
-		return (object)DB::getPDO()->fetchFirst("
+		$zasobInfo = DB::getPDO()->fetchFirst("
 			select z.`ID`, z.`DESC`, z.`DESC_PL`, z.`OPIS`
 			select z.`ID`, z.`DESC`, z.`DESC_PL`, z.`OPIS`
 				, zp.`ID` as P__ID, zp.`DESC` as P__DESC, zp.`TYPE` as P__TYPE
 				, zp.`ID` as P__ID, zp.`DESC` as P__DESC, zp.`TYPE` as P__TYPE
 			from `CRM_LISTA_ZASOBOW` as z
 			from `CRM_LISTA_ZASOBOW` as z
@@ -376,6 +376,7 @@ class ProcesHelper {
 		--		and zp.`DESC`='{$dbName}'
 		--		and zp.`DESC`='{$dbName}'
 				and zp.`TYPE` in('DATABASE_MYSQL','DATABASE','BAZA_DANYCH')
 				and zp.`TYPE` in('DATABASE_MYSQL','DATABASE','BAZA_DANYCH')
 		");
 		");
+		return ($zasobInfo) ? (object)$zasobInfo : null;
 	}
 	}
 
 
 	public static function getZasobTableFieldsInfo($id) {
 	public static function getZasobTableFieldsInfo($id) {