Can we postpone that to another PR? Because I would rather fix that for all occurences in this file by throwing a correct DatabaseException when an error has been returned. The exception however want's the plain sql query as the second parameter, so I have to remember that as a variable. Or I backport executeAudited from master (which is no longer needed there because doctrine will throw exceptions on all occasions). ... I guess I'll backport executeAudited().



"Thomas Müller" <notifications@github.com> schrieb:
>> @@ -67,6 +67,19 @@ public function getNumericStorageId() {
>>  		return $this->numericId;
>>  	}
>>  
>> +	public static function storageExists($storageId) {
>> +		if (strlen($storageId) > 64) {
>> +			$storageId = md5($storageId);
>> +		}
>> +		$query = \OC_DB::prepare('SELECT `numeric_id` FROM
>`*PREFIX*storages` WHERE `id` = ?');
>> +		$result = $query->execute(array($storageId));
>> +		if ($row = $result->fetchRow()) {
>
>in case of error this will fail as $result is an instance of MDB2_Error
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/owncloud/core/pull/5630/files#r7316104

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.