Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Undefined Index' error in item tpl when no shares available #415

Merged
merged 1 commit into from
Aug 29, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions templates/item.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@

<ul class="entry-smartphone-share">
<li class="entry-newwindow"><?PHP echo \F3::get('lang_open_window')?></li>
<?PHP foreach (str_split($sharecfg) as $s) {
$name = $share[$s];
if($name) {
echo '<li class="entry-share'.$name.' entry-share" title="'.$name.'">'.$name.'</li>';
<?PHP if (strlen($sharecfg) > 0) {
foreach (str_split($sharecfg) as $s) {
$name = $share[$s];
if ($name) {
echo '<li class="entry-share'.$name.' entry-share" title="'.$name.'">'.$name.'</li>';
}
}
} ?>
} ?>
</ul>
</div>

Expand All @@ -82,10 +84,12 @@
<li class="entry-unread <?PHP echo $this->item['unread']==1 ? 'active' : ''; ?>"><?PHP echo $this->item['unread']==1 ? \F3::get('lang_mark') : \F3::get('lang_unmark'); ?></li>
<li class="entry-newwindow"><?PHP echo \F3::get('lang_open_window')?></li>
<li class="entry-loadimages"><?PHP echo \F3::get('lang_load_img')?> </li>
<?PHP foreach (str_split($sharecfg) as $s) {
$name = $share[$s];
if($name) {
echo '<li class="entry-share'.$name.' entry-share" title="'.$name.'">&nbsp;</li>';
<?PHP if (strlen($sharecfg) > 0) {
foreach (str_split($sharecfg) as $s) {
$name = $share[$s];
if ($name) {
echo '<li class="entry-share'.$name.' entry-share" title="'.$name.'">&nbsp;</li>';
}
}
} ?>
<li class="entry-close"></li>
Expand Down