<ul><li><strong>Root cause 1 (ProductModel.php line 407):</strong> <code>cleanProd()</code> passed null values to <code>htmlspecialchars()</code> without null-check — PHP 8.1 emits a Deprecated notice which was prepended to the JSON response. Fixed by adding <code>&amp;$value</code> pass-by-reference and null guard.</li><li><strong>Root cause 2 (gbl_ns_vars.php):</strong> Unconditional <code>ini_set('display_errors', 1)</code> caused PHP warnings/notices to output into AJAX responses. Changed to <code>0</code> — errors remain logged to file.</li><li><strong>Root cause 3 (define_common.php):</strong> <code>ini_set('display_errors', 1)</code> inside the ERROR_REPORTING_SET guard was also polluting AJAX response output. Changed to <code>0</code>.</li><li>getAllProducts HTTP endpoint now returns clean JSON starting with <code>[</code> — verified via curl (31 products returned).</li></ul>