Snapin Pack Arguments double-quotes problem
-
@slackenberg
New version 1.5.10.1742, same problem.
It’s very dangerous ! In fact, if you update a snapin without writing whole arguments with double-quotes again, they’re lost and snapin is not executed. -
@Infojoe Please try the latest dev branch. this should be fixed.
The issue was simple:
Basically the arguments are stored and from what I could tell, work, but when the HTML side would go to re-display it it would make an input value of:
value=" -Execution -File "[FOG_SNAPIN].PS1""Do you see the problem?
From HTML side, it would think the string ended at the first double quote.
This has been found and should be fixed in the latest dev-branch.
-
This post is deleted! -
@Tom-Elliott
Corrected in 1.5.10.1744 !
Thank you mastacontrola and Tom

-
@Infojoe They are one in the same lol and you’re welcome.
-
T Tom Elliott has marked this topic as solved
-
@Tom-Elliott what happens when we want the default snapin use (no added arguments before the file)? With the latest patch 1.5.10.1754 (
htmlspecialcharsescape) all our previous working powershell snapins are failing.
The snapin command preview is correct but the dashboard returns error 500

Related commit: https://github.com/FOGProject/fogproject/commit/473787d0f59b9df77f675b24fa74fd6153a57c59
-
@AUTH-IT-Center Since it’s writing a 500 can you provide the php-fpm www-error.log (if redhat based or apache2.log if debian)?
There’s likely some syntax issue I’m unaware of:
For the htmlspecialchars it’s only display representation:
When the HTML forms are built, we encode things which allows the fields to display correctly, and when you hit safe we decode them to ensure they’re stored in the DB correctly.
This leads me to believe this isn’t really the problem but there’s some other syntax issue that I may have missed/added unsuspectingly?
-
[Wed Jan 21 10:55:51.389462 2026] [proxy_fcgi:error] [pid 206230] [client computer_ip:57559] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/image.class.php:496\nStack trace:\n#0 /var/www/html/fog/lib/fog/image.class.php(496): min()\n#1 /var/www/html/fog/lib/fog/image.class.php(389): Image->getPrimaryGroup()\n#2 /var/www/html/fog/lib/fog/host.class.php(1133): Image->getStorageGroup()\n#3 /var/www/html/fog/lib/fog/host.class.php(1408): Host->_createTasking()\n#4 /var/www/html/fog/lib/fog/fogpage.class.php(1757): Host->createImagePackage()\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): FOGPage->deployPost()\n#6 /var/www/html/fog/management/index.php(69): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 496', referer: https://hostname.it.auth.gr/fog/management/index.php?node=host&sub=deploy&id=369&type=13 [Wed Jan 21 10:57:46.453159 2026] [proxy_fcgi:error] [pid 206208] [client computer_ip:62589] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/image.class.php:496\nStack trace:\n#0 /var/www/html/fog/lib/fog/image.class.php(496): min()\n#1 /var/www/html/fog/lib/fog/image.class.php(389): Image->getPrimaryGroup()\n#2 /var/www/html/fog/lib/fog/host.class.php(1133): Image->getStorageGroup()\n#3 /var/www/html/fog/lib/fog/host.class.php(1408): Host->_createTasking()\n#4 /var/www/html/fog/lib/fog/fogpage.class.php(1757): Host->createImagePackage()\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): FOGPage->deployPost()\n#6 /var/www/html/fog/management/index.php(69): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 496', referer: https://hostname.it.auth.gr/fog/management/index.php?node=host&sub=deploy&id=369&type=13 [Wed Jan 21 10:58:23.857033 2026] [proxy_fcgi:error] [pid 277454] [client computer_ip:49357] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/image.class.php:496\nStack trace:\n#0 /var/www/html/fog/lib/fog/image.class.php(496): min()\n#1 /var/www/html/fog/lib/fog/image.class.php(389): Image->getPrimaryGroup()\n#2 /var/www/html/fog/lib/fog/host.class.php(1133): Image->getStorageGroup()\n#3 /var/www/html/fog/lib/fog/host.class.php(1408): Host->_createTasking()\n#4 /var/www/html/fog/lib/fog/fogpage.class.php(1757): Host->createImagePackage()\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): FOGPage->deployPost()\n#6 /var/www/html/fog/management/index.php(69): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 496', referer: https://hostname.it.auth.gr/fog/management/index.php?node=host&sub=deploy&id=369&type=13 [Wed Jan 21 10:58:40.252836 2026] [proxy_fcgi:error] [pid 255909] [client computer_ip:58776] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/image.class.php:496\nStack trace:\n#0 /var/www/html/fog/lib/fog/image.class.php(496): min()\n#1 /var/www/html/fog/lib/fog/image.class.php(389): Image->getPrimaryGroup()\n#2 /var/www/html/fog/lib/fog/host.class.php(1133): Image->getStorageGroup()\n#3 /var/www/html/fog/lib/fog/host.class.php(1408): Host->_createTasking()\n#4 /var/www/html/fog/lib/fog/fogpage.class.php(1757): Host->createImagePackage()\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): FOGPage->deployPost()\n#6 /var/www/html/fog/management/index.php(69): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 496', referer: https://hostname.it.auth.gr/fog/management/index.php?node=host&sub=deploy&id=369&type=13 [Wed Jan 21 11:09:53.556796 2026] [proxy_fcgi:error] [pid 231725] [client computer_ip:59174] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/image.class.php:496\nStack trace:\n#0 /var/www/html/fog/lib/fog/image.class.php(496): min()\n#1 /var/www/html/fog/lib/fog/image.class.php(389): Image->getPrimaryGroup()\n#2 /var/www/html/fog/lib/fog/host.class.php(1133): Image->getStorageGroup()\n#3 /var/www/html/fog/lib/fog/host.class.php(1408): Host->_createTasking()\n#4 /var/www/html/fog/lib/fog/fogpage.class.php(1757): Host->createImagePackage()\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): FOGPage->deployPost()\n#6 /var/www/html/fog/management/index.php(69): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 496', referer: https://hostname.it.auth.gr/fog/management/index.php?node=host&sub=deploy&id=369&type=13 [Wed Jan 21 11:13:02.195715 2026] [proxy_fcgi:error] [pid 259259] [client computer_ip:59235] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/image.class.php:496\nStack trace:\n#0 /var/www/html/fog/lib/fog/image.class.php(496): min()\n#1 /var/www/html/fog/lib/fog/image.class.php(389): Image->getPrimaryGroup()\n#2 /var/www/html/fog/lib/fog/host.class.php(1133): Image->getStorageGroup()\n#3 /var/www/html/fog/lib/fog/host.class.php(1408): Host->_createTasking()\n#4 /var/www/html/fog/lib/fog/fogpage.class.php(1757): Host->createImagePackage()\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): FOGPage->deployPost()\n#6 /var/www/html/fog/management/index.php(69): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 496', referer: https://hostname.it.auth.gr/fog/management/index.php?node=host&sub=deploy&id=369&type=13 [Wed Jan 21 11:28:48.963228 2026] [proxy_fcgi:error] [pid 279174] [client computer_ip:49452] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/image.class.php:496\nStack trace:\n#0 /var/www/html/fog/lib/fog/image.class.php(496): min()\n#1 /var/www/html/fog/lib/fog/image.class.php(389): Image->getPrimaryGroup()\n#2 /var/www/html/fog/lib/fog/host.class.php(1133): Image->getStorageGroup()\n#3 /var/www/html/fog/lib/fog/host.class.php(1408): Host->_createTasking()\n#4 /var/www/html/fog/lib/fog/fogpage.class.php(1757): Host->createImagePackage()\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): FOGPage->deployPost()\n#6 /var/www/html/fog/management/index.php(69): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 496', referer: https://hostname.it.auth.gr/fog/management/index.php?node=host&sub=deploy&id=369&type=13 -
Okay thanks for that, that helped me fix that particular problem and address another elephant I didn’t realize still existed:
Non-Imaging tasks should not require an Image to create a task - which is partly (i believe) why you saw that error.
I’m only guessing here that this was a machine that did not have an image defined to it? If not there’s another rabbit hole I’m not sure I’m ready to dig into right away, but I did add corrections that non-imaging tasks shouldn’t require an image being set on the host level to create the tasking in the first place as well added some failsafes around that particular error:
$assocID = @min((array) $assocID);Was the error it was hitting at line 496, basically with PHP 8, they made min function require a value and if assocID is empty (set just earlier) that’s why you were seeing an error. The assocID here specifically represented the image association on a storage group.
I corrected this specifically by setting assocID to null if there’s nothing in the returned assocIDs previously.
Apologies for the long winded answer.
-
@Tom-Elliott said in Snapin Pack Arguments double-quotes problem:
I’m only guessing here that this was a machine that did not have an image defined to it?
…
I corrected this specifically by setting assocID to null if there’s nothing in the returned assocIDs previously.Apologies for the long winded answer.
You are correct. The host doesn’t have image associated (as many of our hosts
).Unfortunately seems with have to dig more…
[Wed Jan 21 14:52:42.687383 2026] [proxy_fcgi:error] [pid 2630261] [client computer_ip:50247] AH01071: Got error 'PHP message: PHP Warning: Attempt to read property "dev" on null in /var/www/html/fog/lib/pages/dashboardpage.class.php on line 586PHP message: PHP Warning: Attempt to read property "rx" on null in /var/www/html/fog/lib/pages/dashboardpage.class.php on line 588PHP message: PHP Warning: Attempt to read property "tx" on null in /var/www/html/fog/lib/pages/dashboardpage.class.php on line 589', referer: https://dev-hostname.it.auth.gr/fog/management/index.php?node=home [Wed Jan 21 14:55:03.693789 2026] [proxy_fcgi:error] [pid 2665714] [client computer_ip:57526] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: min(): Argument #1 ($value) must contain at least one element in /var/www/html/fog/lib/fog/image.class.php:496\nStack trace:\n#0 /var/www/html/fog/lib/fog/image.class.php(496): min()\n#1 /var/www/html/fog/lib/fog/image.class.php(389): Image->getPrimaryGroup()\n#2 /var/www/html/fog/lib/fog/host.class.php(1133): Image->getStorageGroup()\n#3 /var/www/html/fog/lib/fog/host.class.php(1408): Host->_createTasking()\n#4 /var/www/html/fog/lib/fog/fogpage.class.php(1757): Host->createImagePackage()\n#5 /var/www/html/fog/lib/fog/fogpagemanager.class.php(220): FOGPage->deployPost()\n#6 /var/www/html/fog/management/index.php(69): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/html/fog/lib/fog/image.class.php on line 496', referer: https://dev-hostname.it.auth.gr/fog/management/index.php?node=host&sub=deploy&id=1&type=13@Tom-Elliott said in Snapin Pack Arguments double-quotes problem:
I corrected this specifically by setting assocID to null if there’s nothing in the returned assocIDs previously.
the imageID in the database is
intso maybe thenullvalue causes the error?FYI I am checking it on the DEV VM (other host without image association).
-
@AUTH-IT-Center I added another update but the error you’re seeing is a little strange because it should’ve bene addressed, I don’t know. The min() item is saying it requires a value and the approach I took was to check if there is data in the array, pass it to the min funciton otherwise set it to null (which should work if true)
Of course i don’t have much time to dig deep into this today, but my testing seemed to work without much issue.
Let me see if I can create a host without an image associated, tie a snapin and make a snapin task.