: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace Nextend\SmartSlider3\Application\Model;
use Nextend\Framework\Model\StorageSectionManager;
use Nextend\Framework\Notification\Notification;
use Nextend\Framework\Pattern\SingletonTrait;
use Nextend\SmartSlider3\SmartSlider3Info;
* @package Nextend\SmartSlider3\Application\Model
public function __construct() {
if (defined('SMART_SLIDER_LICENSE')) {
$this->key = SMART_SLIDER_LICENSE;
$this->key = StorageSectionManager::getStorage('smartslider')
public function hasKey() {
return !empty($this->key);
public function maybeActiveLazy() {
$lastActive = StorageSectionManager::getStorage('smartslider')
->get('license', 'isActive');
public function maybeActive() {
$lastActive = StorageSectionManager::getStorage('smartslider')
->get('license', 'isActive');
if ($lastActive && $lastActive > strtotime("-1 week")) {
public function getKey() {
public function setKey($licenseKey) {
StorageSectionManager::getStorage('smartslider')
->set('license', 'key', $licenseKey);
StorageSectionManager::getStorage('smartslider')
->set('license', 'isActive', time());
StorageSectionManager::getStorage('smartslider')
->set('license', 'isActive', '0');
$this->key = $licenseKey;
public function checkKey($license, $action = 'licensecheck') {
public function isActive($cacheAccepted = true) {
if ($cacheAccepted && $this->maybeActive()) {
$status = $this->checkKey($this->key);
if ($this->hasKey() && $status == 'OK') {
StorageSectionManager::getStorage('smartslider')
->set('license', 'isActive', time());
StorageSectionManager::getStorage('smartslider')
->set('license', 'isActive', '0');
public function deAuthorize() {
Notification::notice(n2_('Smart Slider 3 deactivated on this site!'));