bobbingwide / oik-bob-bing-wide

More lazy smart shortcodes
https://www.oik-plugins.com/oik-plugins/oik-bob-bing-wide-more-lazy-smart-shortcodes/
GNU General Public License v2.0
2 stars 0 forks source link

bw_csv - badly formed shortcode produces unexpected output #27

Open bobbingwide opened 6 years ago

bobbingwide commented 6 years ago

While writing a new bw_csv shortcode I'd failed to type the first ] This led to the shortcode attempting to open the named file and Warning messages being returned. This caused the new editor to report Updating failed.

[bw_csv y=Y n=N,Block,core,oik,Divi,Beaver Builder,Fusion objects,Site Origin

Actual output

<br />
<b>Warning</b>:  file(Builder,Fusion): failed to open stream: No such file or directory in <b>plugins\oik-bob-bing-wide\shortcodes\oik-csv.php</b> on line <b>254</b><br />

Twice

Expected output

A friendlier message as part of the shortcode response.

Problem explanation

Ths shortcode interpreted Builder,Fusion as the file name, which it then tried to open without validating the file's presence.

Proposed solution

Workaround.

Insert the missing ]