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

Issue with php 8.2.26 and 8.3.13 #95

Open
bgibson710 opened this issue Dec 9, 2024 · 1 comment
Open

Issue with php 8.2.26 and 8.3.13 #95

bgibson710 opened this issue Dec 9, 2024 · 1 comment

Comments

@bgibson710
Copy link

This is the same issue that was fixed in phpipam 7.1.3 phpipam/phpipam#4339

The agent throws errors when attempting to run. I run on PHP 8.2.x branch. I was using 8.2.24 and it ran fine, I updated to 8.2.26 from the remi repo and it broke.

@bgibson710
Copy link
Author

bgibson710 commented Dec 9, 2024

FWIW I don't know how to do a pull request, but I was able to fix this by changing line 1663 in functions/classes/class.Subnets.php to
$pwr = gmp_pow2(128-$x);

And then copied the function in global-functions from the previously linked issue into functions/global-functions.php
function gmp_pow2(int $exp) : GMP { $result = gmp_init(0); gmp_setbit($result, $exp); return $result; }

skikd636 pushed a commit to skikd636/phpipam-agent that referenced this issue Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant