: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<?php namespace la\core\cache;
use flow\social\cache\LAFacebookCacheManager as ILAFacebookCacheManager;
use flow\social\LASocialException;
use la\core\settings\LASettingsUtils;
if ( ! defined( 'WPINC' ) ) die;
* @author Looks Awesome <email@looks-awesome.com>
* @link http://looks-awesome.com
* @copyright Looks Awesome
class LAFacebookCacheAdapter implements ILAFacebookCacheManager {
public function __construct(){
/** @var $manager ILAFacebookCacheManager */
public function setContext($context){
$this->context = $context;
public function clean() {
* @return array|false|mixed|void|null
public function getAccessToken() {
return $this->get()->getAccessToken();
public function getError() {
return $this->get()->getError();
public function save( $token, $expires ) {
$this->get()->save( $token, $expires );
* @return ILAFacebookCacheManager
if ($this->manager == null){
$db = $this->context['db_manager'];
$auth = $db->getOption('fb_auth_options', true);
$fb_use_own = LASettingsUtils::YepNope2ClassicStyleSafe($auth, 'facebook_use_own_app', false);
$this->manager = $fb_use_own ? new LAFacebookCacheManager($this->context) : new LAFacebookCacheManager2($this->context);
* @throws LASocialException
public function startCounter() {
$this->get()->startCounter();
public function stopCounter() {
$this->get()->stopCounter();
public function hasLimit() {
return $this->get()->hasLimit();
public function addRequest() {
$this->get()->addRequest();
public function getIdPosts( $feedId ) {
return $this->get()->getIdPosts($feedId);