Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -25,8 +25,8 @@ class _Exception extends \RuntimeException
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \IPS\Task $task The task with the issue
|
||||
* @param string $message Error Message
|
||||
* @param \IPS\Task $task The task with the issue
|
||||
* @param string|array $message Error Message
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( \IPS\Task $task, $message )
|
||||
@@ -34,6 +34,12 @@ class _Exception extends \RuntimeException
|
||||
$task->running = FALSE;
|
||||
$task->next_run = \IPS\DateTime::create()->add( new \DateInterval( $task->frequency ) )->getTimestamp();
|
||||
$task->save();
|
||||
|
||||
/* Exception message must be a string */
|
||||
if( is_array( $message ) )
|
||||
{
|
||||
$message = json_encode( $message );
|
||||
}
|
||||
|
||||
return parent::__construct( $message );
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class _Task extends \IPS\Patterns\ActiveRecord
|
||||
$newData = json_encode( $json );
|
||||
|
||||
/* Did it change?? */
|
||||
if ( $newData !== $json )
|
||||
if ( $newData !== $queueData['data'] )
|
||||
{
|
||||
$queueData['data'] = $newData;
|
||||
\IPS\Db::i()->update( 'core_queue', array( 'data' => $newData ), array( 'id=?', $queueData['id'] ) );
|
||||
|
||||
Reference in new issue
Block a user