Skip to content

Commit

Permalink
removed comparisons to NULL and added isset() calls instead as per JP…
Browse files Browse the repository at this point in the history
…'s suggestion
  • Loading branch information
dhawes committed Oct 2, 2005
1 parent 9bd49df commit f00679f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blocks/rss_client/block_rss_client_action.php
Expand Up @@ -59,14 +59,14 @@
$submitters = $CFG->block_rss_client_submitters;
$isteacher = empty($course) ? false : isteacher($id);

if ($act == NULL) {
if ( !isset($act) ) {
rss_display_feeds($id);
rss_print_form($act, $url, $rssid, $preferredtitle, $id);
print_footer();
die();
}

if ($rssid != NULL) {
if ( isset($rssid) ) {
$rss_record = get_record('block_rss_client', 'id', $rssid);
}

Expand Down Expand Up @@ -161,7 +161,7 @@
rss_display_feeds($id);
rss_print_form($act, $dataobject->url, $dataobject->id, $dataobject->preferredtitle, $id);
*/
} else if ( $rss_record != NULL && $act == 'rss_edit' ) {
} else if ( isset($rss_record) && $act == 'rss_edit' ) {

$preferredtitle = stripslashes_safe($rss_record->preferredtitle);
if (empty($preferredtitle)) {
Expand All @@ -183,7 +183,7 @@

redirect($referrer, get_string('feeddeleted', 'block_rss_client') );

} else if ( $rss_record != NULL && $act == 'view' ) {
} else if ( isset($rss_record) && $act == 'view' ) {
// echo $sql; //debug
// print_object($res); //debug
if (!$rss_record->id) {
Expand Down

0 comments on commit f00679f

Please sign in to comment.