Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pfSense-pkg-suricata-6.0.6_1 - Fix PHP8 compatibility issues. Redmine Issue #13531. #1192

Conversation

bmeeks8
Copy link
Contributor

@bmeeks8 bmeeks8 commented Sep 30, 2022

pfSense-pkg-suricata-6.0.6_1
This update fixes a number of PHP8 compatibility issues and introduces the new config_path() and array_path() functions.

New Features:

  1. Introduce use of pfSense config_path() and array_path() functions family for safe access of array data.

Bug Fixes:

  1. Fixes Redmine Issue #13531 - PHP8 errors thrown during package installation and operation.

@bmeeks8
Copy link
Contributor Author

bmeeks8 commented Oct 20, 2022

I believe the Suricata GUI package update for PHP 8.1 is ready for merging unless there are additional reviewer comments.

Copy link
Contributor

@jim-p jim-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough to merge for additional testing

@netgate-git-updates netgate-git-updates merged commit 5fc6406 into pfsense:devel Oct 20, 2022
@bmeeks8 bmeeks8 deleted the pfSense-pkg-suricata-6.0.6_1_PHP-8.1_Fixes branch October 20, 2022 02:09
@@ -129,12 +117,12 @@
/* from the package configuration. The status is now */
/* stored in a local file. */
/**********************************************************/
if (isset($config['installedpackages']['suricata']['config'][0]['last_rule_upd_status'])) {
unset($config['installedpackages']['suricata']['config'][0]['last_rule_upd_status']);
if (config_path_enabled('installedpackages/suricata/config/0', 'last_rule_upd_status')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these and the following, I'd suggest straying away from config_path_enabled() as the intent there is to check if a particular element or property is enabled, with the ultimate goal of being able to abstract out what the implementation of 'enabled' is in the backend of the config. I'd recommend instead using empty as above, or if these properties are optional use config_get_path('foo/bar/baz') !== null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants