Im likely doing something very simply wrong, but when I try to make a directory (using a variable of an insert just performed as the last folder name), I get the error:
in my case $insertID was generated from some data as string by concatinating
$insertID=$year.$otherId;
I simple rewrote code like this and error disappeared:
$insertID=(int)($year.$otherId);