diff --git a/VERSIONS_HOTLINE/182793 b/VERSIONS_HOTLINE/182793 new file mode 100644 index 0000000000000000000000000000000000000000..db1caac31309648a23ec74d8551c3b9868631f6a --- /dev/null +++ b/VERSIONS_HOTLINE/182793 @@ -0,0 +1 @@ + - correctif #182793 : Cosmogramme : Intégration en erreur \ No newline at end of file diff --git a/library/Class/FileManager/FileSystem.php b/library/Class/FileManager/FileSystem.php index 53b673f6d43bdc6ce8586d83caea41726878393c..b596fc4d005edbd3cb1a05e9fa83edbbee03d88e 100644 --- a/library/Class/FileManager/FileSystem.php +++ b/library/Class/FileManager/FileSystem.php @@ -265,7 +265,7 @@ class Class_FileManager_FileSystem { $used = (int)$parts[0]; $free = ($total >= $used) ? ($total - $used) : 0; - $used_percent = sprintf('%.2f',($used / $total) * 100) . '%'; + $used_percent = sprintf('%.2f', $total ? (($used / $total) * 100) : 0) . '%'; $disk_datas = ['free' => $free, 'total' => $total, @@ -431,4 +431,4 @@ class Class_FileManager_FileSystem { public function disableCache() { static::$_cache_status = false; } -} \ No newline at end of file +} diff --git a/tests/library/ZendAfi/View/Helper/Status/JsonTest.php b/tests/library/ZendAfi/View/Helper/Status/JsonTest.php index 6e9cc4e665bd90d180faa92e971ef1e464f0e71f..12b003c95ebe0883d57ffbdb3a4a6e627527c070 100644 --- a/tests/library/ZendAfi/View/Helper/Status/JsonTest.php +++ b/tests/library/ZendAfi/View/Helper/Status/JsonTest.php @@ -26,10 +26,12 @@ class ZendAfi_View_Helper_Status_JsonTest extends ZendAfi_View_Helper_Status_Tes $_report, $_helper_class = 'ZendAfi_View_Helper_Status_Json'; - public function setUp() { parent::setUp(); + /* hotline : https://forge.afi-sa.net/issues/182793 */ + Class_AdminVar::set('ALLOWED_DISK_SPACE', 0); + $this->_report = json_decode($this->_helper->status_Json(), true); }