diff --git a/sources/attachments2.php b/sources/attachments2.php index 5276bf617..cb2cc6b30 100755 --- a/sources/attachments2.php +++ b/sources/attachments2.php @@ -357,7 +357,7 @@ function do_comcode_attachments($original_comcode,$type,$id,$previewing_only=fal // Search backwards from $marker $tag_end_start=$marker-strlen('[/'.$attachment['tag_type'].']'); // would be correct if it is Comcode-XML, but they have the same length, so it's irrelevant $tag_start_end=$tag_end_start; - while (($tag_start_end>1) && ($new_comcode[$tag_start_end-1]!=']') && ($new_comcode[$tag_start_end-1]!='>')) $tag_start_end--; + while (($tag_start_end>1) && ((!isset($new_comcode[$tag_start_end-1])) || (($new_comcode[$tag_start_end-1]!=']') && ($new_comcode[$tag_start_end-1]!='>')))) $tag_start_end--; $param_keep=substr($new_comcode,0,$tag_start_end-1); $end_keep=substr($new_comcode,$tag_end_start); if ($comcode_text) diff --git a/sources/global2.php b/sources/global2.php index acc86af3f..c1b800dbe 100644 --- a/sources/global2.php +++ b/sources/global2.php @@ -1815,7 +1815,7 @@ function javascript_tempcode($position=NULL) $js->attach(do_template('JAVASCRIPT_NEED',array('_GUID'=>'b5886d9dfc4d528b7e1b0cd6f0eb1670','CODE'=>$j))); } } - $js->attach($JAVASCRIPT); + if (!is_null($JAVASCRIPT)) $js->attach($JAVASCRIPT); return $js; } diff --git a/themes/default/templates/OCF_MEMBER_PROFILE_ABOUT.tpl b/themes/default/templates/OCF_MEMBER_PROFILE_ABOUT.tpl index 7066bdab1..2d01fe640 100755 --- a/themes/default/templates/OCF_MEMBER_PROFILE_ABOUT.tpl +++ b/themes/default/templates/OCF_MEMBER_PROFILE_ABOUT.tpl @@ -17,6 +17,25 @@