Skip to content

Commit

Permalink
Fixed potential crash when entry doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rowan Lewis committed May 24, 2011
1 parent 394fcfa commit a9a87c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fields/field.publish_tabs.php
Expand Up @@ -39,6 +39,10 @@ public function prepareTableValue($data, XMLElement $link=NULL, $entry_id=NULL)

// build this entry fully
$em = new EntryManager(Administration::instance());
$entries = $em->fetch($entry_id);

if ($entries === false) return parent::prepareTableValue(null, $link, $entry_id);

$entry = reset($em->fetch($entry_id));

// get the first field inside this tab
Expand Down

0 comments on commit a9a87c9

Please sign in to comment.