According to the documentation, ReadPersistentStorage() (https://www.netxms.org/documentation/nxsl-3.0/#func-readpersistentstorage) is suppose to return null if key does not exist but it seems to be returning an empty string ("") for a recently deleted (This is all happening within EPP) Persistent Storage value.
Is this a bug?
So you are deleting also from EPP?
If you are deleting from NXSL, do you delete like this:
WritePersistentStorage("key1", NULL);
It's a known bug - https://track.radensolutions.com/issue/NX-1897 (https://track.radensolutions.com/issue/NX-1897). Fixed in 3.4.284.
Best regards,
Victor