diff --git a/lib/filestorage/file_archive.php b/lib/filestorage/file_archive.php index 26d02d643c6..d7079414fa7 100644 --- a/lib/filestorage/file_archive.php +++ b/lib/filestorage/file_archive.php @@ -116,7 +116,7 @@ abstract class file_archive implements Iterator { /** * Tries to convert $localname into another encoding, * please note that it may fail really badly. - * @param strin $localname in utf-8 encoding + * @param string $localname in utf-8 encoding * @return string */ protected function mangle_pathname($localname) { diff --git a/lib/filestorage/file_storage.php b/lib/filestorage/file_storage.php index 8c20c277beb..451c0333a59 100644 --- a/lib/filestorage/file_storage.php +++ b/lib/filestorage/file_storage.php @@ -614,7 +614,7 @@ class file_storage { try { $newrecord->id = $DB->insert_record('files', $newrecord); - } catch (database_exception $e) { + } catch (dml_exception $e) { $newrecord->id = false; } @@ -758,7 +758,7 @@ class file_storage { try { $newrecord->id = $DB->insert_record('files', $newrecord); - } catch (database_exception $e) { + } catch (dml_exception $e) { $newrecord->id = false; } @@ -851,7 +851,7 @@ class file_storage { try { $newrecord->id = $DB->insert_record('files', $newrecord); - } catch (database_exception $e) { + } catch (dml_exception $e) { $newrecord->id = false; } diff --git a/lib/filestorage/zip_archive.php b/lib/filestorage/zip_archive.php index c7aac1b8759..8a3243d2d39 100644 --- a/lib/filestorage/zip_archive.php +++ b/lib/filestorage/zip_archive.php @@ -111,7 +111,7 @@ class zip_archive extends file_archive { /** * Returns file stream for reading of content * @param int $index of file - * @return stream or false if error + * @return resource or false if error */ public function get_stream($index) { if (!isset($this->za)) {