Skip to content

Commit

Permalink
pts-core: Fix test profile writer bug noted by Stefan Doesinger when …
Browse files Browse the repository at this point in the history
…using 0 as a value in a test option
  • Loading branch information
michaellarabel committed Jan 27, 2014
1 parent f3588c6 commit 7b7fd6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pts-core/objects/nye_Xml/nye_XmlWriter.php
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions pts-core/objects/pts_test_profile_writer.php
Expand Up @@ -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
Expand Down

0 comments on commit 7b7fd6b

Please sign in to comment.