www: f0ec348c: Minor cleanup. empty() handles checking...

markdoliner at pidgin.im markdoliner at pidgin.im
Sun Aug 7 03:45:27 EDT 2011


----------------------------------------------------------------------
Revision: f0ec348c8f5fb8395de90f7945d3bd8cda5e7889
Parent:   83993d9941db137ea69be8567964123712d1ad95
Author:   markdoliner at pidgin.im
Date:     08/07/11 03:42:39
Branch:   im.pidgin.www
URL: http://d.pidgin.im/viewmtn/revision/info/f0ec348c8f5fb8395de90f7945d3bd8cda5e7889

Changelog: 

Minor cleanup.  empty() handles checking array_key_exists(), so there's
no need to call that function explicitly.  At least, I think that's
right.  No seems to be exploding, at least.

Changes against parent 83993d9941db137ea69be8567964123712d1ad95

  patched  htdocs/news/security/index.php

-------------- next part --------------
============================================================
--- htdocs/news/security/index.php	c266a581a556261fb9b8508958db0bb28f2f2932
+++ htdocs/news/security/index.php	67dd1e7e0f2b0e253db2d6e480341355961d6d8a
@@ -625,7 +625,7 @@ for ($i = $start; $i >= $stop; $i--) {
   <tr>
     <td><a href="?id=<?php echo $i ?>"><?php echo $vun['title'] ?></a></td>
 <?php
-	if (array_key_exists('cve', $vun)) {
+	if (!empty($vun['cve'])) {
     ?>
     <td><a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=<?php echo $vun['cve'] ?>"><?php echo $vun['cve'] ?></a></td>
 <?php
@@ -669,7 +669,7 @@ if ($stop > 0) {
   <tr><th>Title</th><td><?php echo $vun['title'] ?></td></tr>
   <tr><th>Date</th><td><?php echo $vun['date'] ?></td></tr>
   <?php
-	if (array_key_exists('cve', $vun) && !empty($vun['cve'])) {
+	if (!empty($vun['cve'])) {
   ?>
   <tr><th>CVE Name</th><td><a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=<?php echo $vun['cve'] ?>"><?php echo $vun['cve'] ?></a></td></tr>
   <?php
@@ -690,7 +690,7 @@ if ($stop > 0) {
   <tr><th>Description</th><td><?php echo $vun['description'] ?></td></tr>
 
   <?php
-	if (array_key_exists('fixrevisions', $vun) && !empty($vun['fixrevisions'])) {
+	if (!empty($vun['fixrevisions'])) {
 		// fixrevisions is a comma delimited list of revisions.  Linkify each one individually.
 		$fixrevisions = '';
 		foreach (explode(',', $vun['fixrevisions']) as $revision) {


More information about the Commits mailing list