mirror of
https://github.com/e107inc/e107.git
synced 2025-08-17 20:01:47 +02:00
PHP Notice removal
This commit is contained in:
@@ -2694,7 +2694,7 @@ class e_parser
|
||||
*/
|
||||
public function toGlyph($text, $space=" ")
|
||||
{
|
||||
if(!deftrue('BOOTSTRAP'))
|
||||
if(!deftrue('BOOTSTRAP') || empty($text))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -2718,10 +2718,14 @@ class e_parser
|
||||
// Get Glyph names.
|
||||
$bs3 = e107::getMedia()->getGlyphs('bs3','');
|
||||
$fa4 = e107::getMedia()->getGlyphs('fa4','');
|
||||
|
||||
|
||||
|
||||
list($cls,$tmp) = explode('.glyph',$text);
|
||||
list($cls) = explode('.glyph',$text,2);
|
||||
// list($type, $tmp2) = explode("-",$text,2);
|
||||
|
||||
// return $cls;
|
||||
|
||||
$removePrefix = array('glyphicon-','icon-','fa-');
|
||||
|
||||
$id = str_replace($removePrefix, "", $cls);
|
||||
@@ -2748,6 +2752,8 @@ class e_parser
|
||||
$tag = 'i';
|
||||
}
|
||||
|
||||
$size = '';
|
||||
|
||||
}
|
||||
|
||||
$text = "<".$tag." class='".$prefix.$id.$size."'></".$tag.">" ;
|
||||
|
Reference in New Issue
Block a user