Issue scripting Adobe Photoshop >22.5: make new path item -> program error

The issue is on Adobe community but I can’t post the link here.

The issue is summarised as:

Since upgrading Photoshop to 22.5.0 on my Mac OS 11.5.2 I have a problem with the following command in all my AppleScripts that feature it:

make new path item with properties {entire path:PathDetails, name:“Path Name”, kind:normal}

Photoshop will throw the error “Could not complete the command because of a program error.”, but will continue on and execute the above command anyway.

I wondered if anyone else has encountered this and/or found a workaround?

It’s hard to say, without knowing what’s in the PathDetails variable.

It should be a list.

→ Photoshop: 22.5.1 (22.5.1)
→ Mac OS: 11.6.1 (20G224)
→ Script Debugger 8.0.3 (8A43)