CESNET / pakiti-server

Pakiti provides a monitoring mechanism to check the patching status of Linux systems.
BSD 2-Clause "Simplified" License
49 stars 35 forks source link

PHP7.2 compat - Remove unnecessary object pass by reference and eval #148

Closed lucasnetau closed 5 years ago

lucasnetau commented 6 years ago

Hi, We prepared the following after upgrading our Pakiti instance to PHP 7.2

1) Remove all the passing Objects around by reference in function calls and in foreach loops. They are not unnecessary of objects and generate Notices

Only variables should be passed by reference Only variables should be assigned by reference https://wiki.php.net/rfc/reclassify_e_strict#only_variables_should_be_passed_by_reference

2) Remove the use of eval We can create the required objects directly rather than use eval().

kouril commented 5 years ago

Hi,

thanks a lot for the patch. In order to ease the review and keep the history clean, please split the commits into two pull requests, with a95cc1f being in one, and 630ea75, 30edab5 forming the other one (ideally squashed into a single commit). Also, please add the description from the PR directly to the commit messages. Thanks,

Daniel

lucasnetau commented 5 years ago

Done, I've opened PR #149 and #150