Skip to content
Commit 3fe6b5b5 authored by Joas Schilling's avatar Joas Schilling Committed by backportbot[bot]
Browse files

Fix numeric folders throwing on markDirty



TypeError: strpos() expects parameter 1 to be string, int given

The problem is that in cacheNode() we strip of any slashes, so
a folder "0/" will be trimmed to "0" and be used as an array key.
Since PHP automatically casts numeric array keys to integers,
you afterwards get $nodePath as int(0). Since it's now a number,
the strpos() function does not accept it anymore. Simply casting
$nodePath to a string again in the foreach solves the issue

Signed-off-by: default avatarJoas Schilling <coding@schilljs.com>
parent 066eafb1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment