diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2008-12-02 18:11:40 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2008-12-02 18:11:40 +0000 |
| commit | 96d4ad547d3a037ba4c90a180d966f3ed0f49fbb (patch) | |
| tree | 77c627c7d26d72927ca80631cd239f28b58fc117 | |
| parent | 3d146c05309dd181172a4ec5683d623f0379b4f7 (diff) | |
| download | nexus-96d4ad547d3a037ba4c90a180d966f3ed0f49fbb.tar.gz nexus-96d4ad547d3a037ba4c90a180d966f3ed0f49fbb.tar.bz2 nexus-96d4ad547d3a037ba4c90a180d966f3ed0f49fbb.zip | |
undefined index fix
| -rw-r--r-- | Nexus.php | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -4,7 +4,7 @@ * * @abstract * @author xing <xing@synapse.plus.com> -* @version $Revision: 1.28 $ +* @version $Revision: 1.29 $ * @package nexus */ @@ -340,16 +340,18 @@ class Nexus extends NexusSystem { case 'content_id': // create *one* object for each object *type* to call virtual methods. $row = $this->mDb->getRow( "SELECT `title`,`content_id`,`content_type_guid` FROM `".BIT_DB_PREFIX."liberty_content` WHERE `content_id`=?", array( $pItemHash['rsrc'] )); - $type = &$contentTypes[$row['content_type_guid']]; + if( !empty( $row['content_type_guid'] )) { + $type = &$contentTypes[$row['content_type_guid']]; - if( empty( $type['content_object'] )) { - include_once( $gBitSystem->mPackages[$type['handler_package']]['path'].$type['handler_file'] ); - $type['content_object'] = new $type['handler_class'](); - } + if( empty( $type['content_object'] )) { + include_once( $gBitSystem->mPackages[$type['handler_package']]['path'].$type['handler_file'] ); + $type['content_object'] = new $type['handler_class'](); + } - $type['content_object']->mContentId = $row['content_id']; - $type['content_object']->load(); - $ret = $type['content_object']->getDisplayUrl(); + $type['content_object']->mContentId = $row['content_id']; + $type['content_object']->load(); + $ret = $type['content_object']->getDisplayUrl(); + } break; case 'structure_id': $ret .= BIT_ROOT_URL.'index.php?structure_id='.$pItemHash['rsrc']; |
