freebsd-ports/net-mgmt/pnp/files/patch-share_pnp_application_lib_json.php
Lars Engels 18ee779f87 net-mgmt/pnp:
- Add patches from Check_MK that workaround missing sizeof() function in PHP 7.x
- Bump PORTREVSION
2019-01-16 13:37:50 +00:00

11 lines
627 B
PHP

--- share/pnp/application/lib/json.php.orig 2017-08-21 15:52:37 UTC
+++ share/pnp/application/lib/json.php
@@ -375,7 +375,7 @@ class Services_JSON
*/
// treat as a JSON object
- if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
+ if (is_array($var) && count($var) && (array_keys($var) !== range(0, count($var) - 1))) {
$properties = array_map(array($this, 'name_value'),
array_keys($var),
array_values($var));