I get this when hitting Apply to save an image and when viewing a full-sized image. Doing some debug output, looks like the value for WEBPATH is empty and that's causing the issue.
Figured out the emoji thing. Found previous thread on here where I talked about it. Changed the "Entity encoding" option in the tinymce4 plugin to "numeric". Now it keeps the emojis intact.
I cannot reproduce this on my test install. Can ypu try to replace `strpos` with `mb_strpos` in that line to see if that fixes it for you? Assuming your server has the multibyte extension.
For now the PHP multibyte extension is not a requirement but probably we could change that in the future to avoid extra checks or even wrapper functions…(Can't understand why this is not default in PHP in the standard functions anyway by now)
Also some multibyte characters and this also applies to emojis require a different database encoding using "mb4" encoding variants. This will be the default in the future (depending on the mysql version) but for now we have chosen not to implement that because it also requires changes to existing tables and columns. Their size needs to be adjusted to be larger because each character requires more space then. So it's on the long TODO list.
Using `mb_strpos` I get a slightly different warning:
WARNING: mb_strpos(): Empty delimiter in C:\(path)\zp-core\functions-basic.php on line 1882
I added some debug lines to log variable values so that's not the original line number for that code.
Should WEBPATH actually contain a value other than "" ? It makes sense that the functions would complain about the item being searched for (needle) is an empty value.
I can suppress the warning message by using `@strpos` Everything seems to be working otherwise.
> Should WEBPATH actually contain a value other than "" ?
Yes, if you installed in the root of your (sub)domain it is empty, if installed in a folder it will containt that folder. Matches the rewrite base in the htaccess file technically.
I previously tested locally which is always in a subfolder but even on our site I don't get this error when saving an image.
> @strpos
Supressing errors is generally not a good idea (I know the ZP code has in lots of places which is to be reviewed sometime…)
The fix is in the support build now. I also discovered that on installs with WEBPATH like my localhost installs the function did return an unwanted double slash in the URL which is also fixed.