Will Foran
Will Foran
I have read the CLA Document and I hereby sign the CLA
Sure! I think a file like `bids/sub-1/dwi/sub-1_dir-AP.nii` will trigger the error (with `dir-AP` as the offending part). I added an attempt at a unit test to demonstrate. `spm_tests('class','unit','test','test_spm_bids')` passes with...
Maybe the best fix is to enumerate [all required and optional](https://bids-specification.readthedocs.io/en/stable/appendices/entity-table.html) entities in the dwi loop's `parse_filename`: `'sub','ses','task','acq','ce','rec','dir','run','part','recording'` instead of just `{'sub','ses','acq','run', 'bval','bvec'})`? Will a bunch of most often empty...
I worried the walrus operator was suspicious, albeit more concise. hopefully removing it does the trick for py3.7
sorry for the long delay! The initial start/end strip now handles double quotes. And within token quotes and escaped-quotes are managed. I'm not sure I've gotten the edge cases correct....
Ah, my confusion is maybe php interpreting the unsigned return of unkpack as signed. Forcing unsigned with `sprintf("%u",...)` shows matching values. ``` $ip = inet_pton('7fff:ffff:ffff:ffff:ffff:ffff:ffff:ffff'); var_dump( unpack('J2', $ip)); array(2) {...
after merging with upstream, all `ip_test` phpunits pass! ``` docker run -v $PWD/..:/dokuwiki --workdir /dokuwiki/_test -it docker://wpstaging/php:8.3-32bit ./vendor/bin/phpunit --verbose --stderr --filter ip_test WARNING: image platform (linux/386) does not match the...
oh! hold off! Running through the tests again. I think I have a error on the 32bit boundary and there's maybe an inconsequential overflow bug for the existing 64bit code...
Back on track! Tested with php7.4-32bit and local 8.4 ``` podman run -v $PWD:/dokuwiki --platform linux/386 --workdir /dokuwiki/_test docker://wpstaging/php:7.4-32bit ./vendor/bin/phpunit --verbose --stderr # Runtime: PHP 7.4.33 # Tests: 2293, Assertions:...
Ah with a more representative example I caught the error. [pack `J`](https://www.php.net/manual/en/function.pack.php#:~:text=unsigned%20long%20long%20(always%2064%20bit%2C%20big%20endian%20byte%20order)) is 64-bit only? Is dokuwiki 64-bit only? ``` $ip = $_SERVER['REMOTE_ADDR']; $binary = inet_pton($ip); $result = unpack('Jupper/Jlower', $binary);...