mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-48688-master' of git://github.com/ankitagarwal/moodle
This commit is contained in:
commit
ccc1782b69
@ -415,7 +415,7 @@ class manager {
|
||||
mtrace("-- Returning to the original user.");
|
||||
cron_setup_user($originaluser);
|
||||
return;
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
// An unknown error occurred. The user is not informed, but the administrator is.
|
||||
mtrace("-- Message processing failed. An unexpected exception was thrown. Details follow.");
|
||||
mtrace($e->getMessage());
|
||||
@ -497,8 +497,8 @@ class manager {
|
||||
/**
|
||||
* Process a message again to add body and attachment data.
|
||||
*
|
||||
* @param Horde_Imap_Client_Data_Fetch $basemessagedata The structure and part of the message body
|
||||
* @param string|Horde_Imap_Client_Ids $messageid The Hore message Uid
|
||||
* @param \Horde_Imap_Client_Data_Fetch $basemessagedata The structure and part of the message body
|
||||
* @param string|\Horde_Imap_Client_Ids $messageid The Hore message Uid
|
||||
* @return \stdClass The current value of the messagedata
|
||||
*/
|
||||
private function process_message_data_body(
|
||||
@ -652,7 +652,7 @@ class manager {
|
||||
// Perform a virus scan now.
|
||||
try {
|
||||
\repository::antivir_scan_file($filepath, $attachment->filename, true);
|
||||
} catch (moodle_exception $e) {
|
||||
} catch (\moodle_exception $e) {
|
||||
mtrace("--> A virus was found in the attachment '{$attachment->filename}'.");
|
||||
$this->inform_attachment_virus();
|
||||
return;
|
||||
@ -802,7 +802,7 @@ class manager {
|
||||
$error->message = $e->getMessage();
|
||||
throw new \core\message\inbound\processing_failed_exception('messageprocessingfailed', 'tool_messageinbound', $error);
|
||||
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
mtrace("-> The Inbound Message handler threw an exception. Unable to process this message. User informed.");
|
||||
mtrace("--> " . $e->getMessage());
|
||||
// An unknown error occurred. Still inform the user but, this time do not include the specific
|
||||
|
@ -325,8 +325,8 @@ class address_manager {
|
||||
if ($content['handlerid1'] > 0 || $content['userid1'] > 0 || $content['datavalue1'] > 0) {
|
||||
// Any 64-bit integer which is greater than the 32-bit integer size will have a non-zero value in the first
|
||||
// half of the integer.
|
||||
throw new moodle_exception('Mixed environment.' +
|
||||
' Key generated with a 64-bit machine but received into a 32-bit machine');
|
||||
throw new \moodle_exception('Mixed environment.
|
||||
Key generated with a 64-bit machine but received into a 32-bit machine.');
|
||||
}
|
||||
$content['handlerid'] = $content['handlerid2'];
|
||||
$content['userid'] = $content['userid2'];
|
||||
|
@ -38,7 +38,7 @@ class processing_failed_exception extends \moodle_exception {
|
||||
*
|
||||
* @param string $identifier The string identifier to use when displaying this exception.
|
||||
* @param string $component The string component
|
||||
* @param stdClass $data The data to pass to get_string
|
||||
* @param \stdClass $data The data to pass to get_string
|
||||
*/
|
||||
public function __construct($identifier, $component, \stdClass $data = null) {
|
||||
return parent::__construct($identifier, $component, '', $data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user