zipurman / oVIRT_Simple_Backup

A REST API backup using PHP for oVirt 4.2.x
GNU General Public License v3.0
56 stars 32 forks source link

Typo in the code #58

Open bonifacyi opened 4 years ago

bonifacyi commented 4 years ago

I think you have a typo in the code /area/settings.php line 153 quotation marks are missing fwrite( $configfile, '"retention" => "' . $retention . '",' . "\n" );

zipurman commented 4 years ago

$retention should be an integer not a string, so the quotes should not be there.

bonifacyi commented 4 years ago

without the quotes, an error occurs: PHP Parse error: syntax error, unexpected ',' in /var/www/html/config.php on line 15 this happens when you first start

zipurman commented 4 years ago

The default value should be 0. If it is then that error will occur. Add quotes wont break anything so if that solves your issue then all good. You could add the following line before line 153 to solve this issue as well.

if (empty($retention)) $retention = 0;