1
0
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:
Cameron
2014-02-07 07:03:23 -08:00
parent f96f755318
commit c7cb6d2975
3 changed files with 10 additions and 13 deletions

View File

@@ -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.">" ;