Skip to content

Commit

Permalink
Fix unserializable problem
Browse files Browse the repository at this point in the history
  • Loading branch information
mosonyi committed May 28, 2019
1 parent 5294920 commit eeb06c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions models/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace nterms\mailqueue\models;

error_reporting(E_ALL & ~E_NOTICE);
ini_set("unserialize_callback_func", "self::callback_no_spl");

use Yii;
use yii\db\ActiveRecord;
use nterms\mailqueue\MailQueue;
Expand All @@ -20,6 +23,10 @@
*/
class Queue extends ActiveRecord {

public static function callback_no_spl($classname) {
throw new \Exception("The class $classname needs to be available.");
}

/**
* @inheritdoc
*/
Expand Down

0 comments on commit eeb06c0

Please sign in to comment.