aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/autoload
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-29 03:15:40 +0900
committernsfisis <nsfisis@gmail.com>2026-06-29 03:15:40 +0900
commit633a250e3039d766af3ed5733fe9b825b994511c (patch)
treedd40d55159217a3680f174e23cb0cb05017556a6 /crates/shirabe/src/autoload
parent27e02b6c8968f89cf601ef597fcefa6a9627718e (diff)
downloadphp-shirabe-633a250e3039d766af3ed5733fe9b825b994511c.tar.gz
php-shirabe-633a250e3039d766af3ed5733fe9b825b994511c.tar.zst
php-shirabe-633a250e3039d766af3ed5733fe9b825b994511c.zip
fix(json): use php_truthy for JsonManipulator content validity guards
The `!@json_decode($children)` guards in addSubNode/removeSubNode were translated as `is_null() || as_bool() == Some(false)`, which drops PHP's other falsy cases (empty array/string, "0", 0). At the removeSubNode site (assoc=true) this diverged from Composer: an empty object node decodes to an empty array, which PHP treats as falsy and aborts on, but the Rust guard kept going. Replace both with php_truthy, the faithful rendering of PHP `!`, preserving the deliberate empty-`{}` behavior difference between the assoc=false (addSubNode) and assoc=true (removeSubNode) sites. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/autoload')
0 files changed, 0 insertions, 0 deletions