diff --git a/.travis.yml b/.travis.yml index 6a29267bc69..5e7030aade6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -77,8 +77,9 @@ before_script: #script: phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/AllTests.php #script: phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml --coverage-text test/phpunit/BuildDocTest.php #script: phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/WebservicesOtherTest.php +#script: phpcs -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . script: - - phpcs -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . + - phpcs -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/documents/,/includes/,/test/report/ . - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php after_script: diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index a0d63eea2fa..8c6eba6e894 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -1,20 +1,20 @@ * Copyright (c) 2004-2013 Laurent Destailleur -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/core/class/dolgraph.class.php @@ -437,6 +437,7 @@ class DolGraph function SetBgColor($bg_color = array(255,255,255)) { global $theme_bgcolor,$theme_bgcoloronglet; + if (! is_array($bg_color)) { if ($bg_color == 'onglet') @@ -464,6 +465,7 @@ class DolGraph function SetBgColorGrid($bg_colorgrid = array(255,255,255)) { global $theme_bgcolor,$theme_bgcoloronglet; + if (! is_array($bg_colorgrid)) { if ($bg_colorgrid == 'onglet') @@ -1033,6 +1035,7 @@ class DolGraph return $this->_stringtoshow; } + /** * getDefaultGraphSizeForStats * @@ -1050,4 +1053,4 @@ class DolGraph } } -?> +?> \ No newline at end of file