1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

PHP 7.1 Fixes.

This commit is contained in:
Cameron 2016-12-16 10:53:59 -08:00
parent 982fa869e3
commit e05425fbb2
4 changed files with 15 additions and 7 deletions

View File

@ -512,10 +512,10 @@ class news_shortcodes extends e_shortcode
}
}
function sc_extended($parm='')
function sc_extended($parm=null)
{
$class = vartrue($parm['class']) ? "class='".$parm['class']."'" : '';
$class = !empty($parm['class']) ? "class='".$parm['class']."'" : '';
if ($this->news_item['news_extended'] && ($this->param['current_action'] != 'extend' || $parm == 'force'))
{
@ -931,6 +931,10 @@ class news_shortcodes extends e_shortcode
/* @deprecated - use {NEWS_CATEGORY_ICON} instead */
function sc_newscaticon($parm = array())
{
if(is_string($parm))
{
$parm = array('type'=>$parm);
}
// BC
$category_icon = str_replace('../', '', trim($this->news_item['category_icon']));
if (!$category_icon) { return ''; }
@ -955,7 +959,7 @@ class news_shortcodes extends e_shortcode
$icon = e107::getParser()->toIcon($category_icon, $parm);
switch($parm)
switch($parm['type'])
{
/* @deprecated - Will cause issues with glyphs */
case 'src':

View File

@ -140,7 +140,7 @@ class e_menu
*/
public function pref()
{
return $this->_current_parms;
return (empty($this->_current_parms)) ? array() : $this->_current_parms;
}

View File

@ -1008,6 +1008,11 @@ class e_parse_shortcode
$parm = str_replace(array('[[', ']]'), array('{', '}'), $parm);
}
if(empty($parm))
{
$parm = array();
}
if (E107_DBG_BBSC || E107_DBG_SC || E107_DBG_TIMEDETAILS)
{

View File

@ -187,9 +187,8 @@ class social_shortcodes extends e_shortcode
* $socialArray = array('url'=>'your-url-here', 'title'=>'your-title-here');
e107::getScBatch('social')->setVars($socialArray);
*/
function sc_socialshare($parm='') // Designed so that no additional JS required.
function sc_socialshare($parm=array()) // Designed so that no additional JS required.
{
$pref = e107::pref('social');
if(varset($pref['sharing_mode']) == 'off')