Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Advanced editor - upload failing - incorrect integer value

I'm finally getting around to experimenting with the advanced editor which is really neat, but I'm running into a problem with the upload feature. Specifically when I upload a file (image, text file or anything else) I get an exception occurring:

PHP Fatal error: Incorrect integer value: '' for column 'ThumbWidth' at row 1|Gdn_Database|Query|insert GDN_Media

Which is correct - the code defaults a default as '' for ThumbWidth but the Media table is: ThumbWidth smallint(5) unsigned DEFAULT NULL,.

So if there is no thumbnail it should presumably be setting a null value rather than empty string.

I'm sure others use this feature, so I'll have done something wrong, but I can't figure out what. Does anyone have any ideas?


Best Answer


  • Options

    Thanks. I've sent a pull request. Set the defaults to be 0, but they should really be null.

Sign In or Register to comment.