From 7b7fd6bb549f38960754ede0d4270273a38a07df Mon Sep 17 00:00:00 2001 From: Michael Larabel Date: Sun, 26 Jan 2014 19:54:25 -0600 Subject: [PATCH] pts-core: Fix test profile writer bug noted by Stefan Doesinger when using 0 as a value in a test option --- pts-core/objects/nye_Xml/nye_XmlWriter.php | 6 +++--- pts-core/objects/pts_test_profile_writer.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pts-core/objects/nye_Xml/nye_XmlWriter.php b/pts-core/objects/nye_Xml/nye_XmlWriter.php index d18fa8de38..b2283346d9 100644 --- a/pts-core/objects/nye_Xml/nye_XmlWriter.php +++ b/pts-core/objects/nye_Xml/nye_XmlWriter.php @@ -3,8 +3,8 @@ /* Phoronix Test Suite URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/ - Copyright (C) 2010 - 2013, Phoronix Media - Copyright (C) 2010 - 2013, Michael Larabel + Copyright (C) 2010 - 2014, Phoronix Media + Copyright (C) 2010 - 2014, Michael Larabel nye_XmlWriter.php: The XML writing object for the Phoronix Test Suite succeeding tandem_XmlWriter Additional Notes: A very simple XML writer with a few extras... Does not support attributes on tags, etc. @@ -52,7 +52,7 @@ public function __construct($xsl_binding = null, $nice_formatting = true) public function addXmlNodeWNE($xml_location, $xml_value = null) { // When Not Empty, add the XML node - return empty($xml_value) ? false : $this->addXmlNode($xml_location, $xml_value); + return $xml_value === null || $xml_value === false ? false : $this->addXmlNode($xml_location, $xml_value); } public function addXmlNode($xml_location, $xml_value = null) { diff --git a/pts-core/objects/pts_test_profile_writer.php b/pts-core/objects/pts_test_profile_writer.php index b95374f763..c04659e689 100644 --- a/pts-core/objects/pts_test_profile_writer.php +++ b/pts-core/objects/pts_test_profile_writer.php @@ -3,8 +3,8 @@ /* Phoronix Test Suite URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/ - Copyright (C) 2010 - 2013, Phoronix Media - Copyright (C) 2010 - 2013, Michael Larabel + Copyright (C) 2010 - 2014, Phoronix Media + Copyright (C) 2010 - 2014, Michael Larabel This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by