mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	mgate: fix error report
This commit is contained in:
		| @@ -29,8 +29,14 @@ class MGate | |||||||
|             abort(500, '网络异常'); |             abort(500, '网络异常'); | ||||||
|         } |         } | ||||||
|         if ($curl->error) { |         if ($curl->error) { | ||||||
|             $errors = (array)$result->errors; |             if (isset($result->errors)) { | ||||||
|             abort(500, $errors[array_keys($errors)[0]][0]); |                 $errors = (array)$result->errors; | ||||||
|  |                 abort(500, $errors[array_keys($errors)[0]][0]); | ||||||
|  |             } | ||||||
|  |             if (isset($result->message)) { | ||||||
|  |                 abort(500, $result->message); | ||||||
|  |             } | ||||||
|  |             abort(500, '未知错误'); | ||||||
|         } |         } | ||||||
|         $curl->close(); |         $curl->close(); | ||||||
|         if (!isset($result->data->trade_no)) { |         if (!isset($result->data->trade_no)) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user