drawshield / Drawshield-Code

PHP code to create SVG shield images from Blazons, as used on drawshield.net
https://drawshield.net
GNU General Public License v3.0
49 stars 17 forks source link

`Per bend sinister` in flag shape reports an error in /svg/pathtools.inc #642

Closed 5ucur closed 11 months ago

5ucur commented 11 months ago

A blazon like Per bend sinister, Gules and Sable with the flag shape (the ratio seems not to matter) gives the following error (or warning?):

/svg/pathtools.inc:181 : preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated

Also, the split does not go cleanly from corner to corner, like the bend dexter one does (which also doesn't give the error). Example follows.

Image example here ![example](https://github.com/drawshield/Drawshield-Code/assets/28569802/f0e1206e-d837-4c68-a61c-f20fb686eae3)

For now, the workaround is to make a mirrored flag and flip it after export, but the error/warning is the main reason I'm reporting this.

karlwilcox commented 11 months ago

Thanks for spotting this. Couple of typos, will upload changes soon

5ucur commented 11 months ago

It's been fixed! Closing this for you.