Bug Report: Issue with `http_build_query()` in Xero Integration
I would like to report an issue I encountered while integrating Xero services into my application. I am experiencing the following deprecation warning and errors:
Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /opt/una/modules/boonex/xero/plugins/league/oauth2-client/src/Tool/QueryBuilderTrait.php on line 31
Warning: Cannot modify header information - headers already sent by (output started at /opt/una/modules/boonex/xero/plugins/league/oauth2-client/src/Tool/QueryBuilderTrait.php:31) in /opt/una/inc/classes/BxDolTemplate.php on line 3740
Warning: Cannot modify header information - headers already sent by (output started at /opt/una/modules/boonex/xero/plugins/league/oauth2-client/src/Tool/QueryBuilderTrait.php:31) in /opt/una/inc/classes/BxDolTemplate.php on line 3743
Steps to Reproduce:
UNA 14.0.0-RC4, Xero 13.0.2, OAuth2 Server 14.0.1 by UNA INC with PHP 8.1
1. Integrate the Xero service
2. Attempt to AUTORIZE the application
Expected Result:
The application should connect to Xero without any warnings or errors.
Actual Result:
The application throws a deprecation warning related to the `http_build_query()` function and subsequent header modification errors.
Suggested Fix:
It appears that the issue may stem from passing a null value as a prefix to the `http_build_query()` function in the `QueryBuilderTrait.php` file. I suggest ensuring that a valid string is passed as the second parameter to avoid this deprecation warning.
Please let me know if there are any updates regarding this issue or if further information is needed from my side.
Chrome developer:
Page layout may be unexpected due to Quirks Mode
One or more documents in this page is in Quirks Mode, which will render the affected document(s) with quirks incompatible with the current HTML and CSS specifications.
Quirks Mode exists mostly due to historical reasons. If this is not intentional, you can add or modify the DOCTYPE to be `` to render the page in No Quirks Mode.
Affected Resources
1 element
Document in the DOM treeModeURLdocumentQuirks Mode https://www.exemple.com/studio/module.php?name=bx_xero&page=authorize
Learn more: Document compatibility mode
SERVER SETUP:
PHP:
version = 8.1.32 - OK
allow_url_fopen = On - OK
allow_url_include = Off - OK
magic_quotes_gpc = Off - OK
memory_limit = 32 GB - OK
post_max_size = 2 GB - OK
upload_max_filesize = 2 GB - OK
register_globals = Off - OK
safe_mode = Off - OK
disable_functions - OK
php module: curl = curl - OK
php module: gd = gd - OK
php module: mbstring = mbstring - OK
php module: json = json - OK
php module: fileinfo = fileinfo - OK
php module: zip = zip - OK
php module: openssl = openssl - OK
php module: exif = exif - OK
MySQL:
version = 11.7.2 - OK
Web-server: nginx/1.27.4
rewrite_module - UNDEFINED
OS:
Linux localhost 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
Site setup
UNA version = 14.0.0-RC4 - OK
Files and folders permissions - please click here to find out if permissions are correct.
ffmpeg -
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
if you don't know if output is correct then manual server audit may be required.
Mail sending - click here to send test email
Cron jobs -
no crontab for www-data
if you are unsure if output is correct then manual server audit may be required
Last cron jobs execution - 24 Mar 2025 8:59:01 am
Site optimization
PHP:
PHP accelerator = ZendOPcache - OK
PHP setup = fpm-fcgi - OK
MySQL:
key_buffer_size = 128 MB - OK
max_heap_table_size = 16 MB - OK
tmp_table_size = 16 MB - OK
thread_cache_size = 256 - OK
Web-server:
User-side caching for static content - click here to check it in Google Page Speed
If it is not enabled then please consider implement this optimization, since it improve perceived site speed and save the bandwidth.
To apply this optimization you need to have expires_module - UNDEFINED
Server-side content compression - can be checked manually or in "Page Speed" tool build-in into browser.
If it is not enabled then please consider implement this optimization, since it improve perceived site speed and save the bandwidth.
To apply this optimization you need to have deflate_module - UNDEFINED
UNA:
DB cache = On (Memcache based cache engine) - OK
Pages cache = On (Memcache based cache engine) - OK
Page blocks cache = On (Memcache based cache engine) - OK
Templates Cache = On (Memcache based cache engine) - OK
CSS files cache = On - OK
JS files cache = On - OK
Compression for CSS/JS cache = On - OK
Thank you for your attention to this matter!
Regards,