{"action":"closed","issue":{"url":"https://api.github.com/repos/Pennebaker/craftcms-thearchitect/issues/27","repository_url":"https://api.github.com/repos/Pennebaker/craftcms-thearchitect","labels_url":"https://api.github.com/repos/Pennebaker/craftcms-thearchitect/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/Pennebaker/craftcms-thearchitect/issues/27/comments","events_url":"https://api.github.com/repos/Pennebaker/craftcms-thearchitect/issues/27/events","html_url":"https://github.com/Pennebaker/craftcms-thearchitect/issues/27","id":186477153,"number":27,"title":"PHP error when exporting rich text fields","user":{"login":"benjamminf","id":6325915,"avatar_url":"https://avatars.githubusercontent.com/u/6325915?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamminf","html_url":"https://github.com/benjamminf","followers_url":"https://api.github.com/users/benjamminf/followers","following_url":"https://api.github.com/users/benjamminf/following{/other_user}","gists_url":"https://api.github.com/users/benjamminf/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamminf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamminf/subscriptions","organizations_url":"https://api.github.com/users/benjamminf/orgs","repos_url":"https://api.github.com/users/benjamminf/repos","events_url":"https://api.github.com/users/benjamminf/events{/privacy}","received_events_url":"https://api.github.com/users/benjamminf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-01T07:50:00Z","updated_at":"2016-11-02T13:38:41Z","closed_at":"2016-11-02T13:38:41Z","body":"I'll preface this issue report with this: [this is actually a result of a Craft bug](https://craftcms.uservoice.com/forums/285224-bugs/suggestions/16896796-rich-text-field-doesn-t-save-checkbox-settings-cor).\r\n\r\nSo what's happing is a rich text field with no checked asset sources and/or transforms ends up throwing a PHP warning on export.\r\n\r\n<img width=\"998\" alt=\"screen shot 2016-11-01 at 6 46 34 pm\" src=\"https://cloud.githubusercontent.com/assets/6325915/19882684/8ff394ce-a063-11e6-9628-30e361202788.png\">\r\n\r\nLooking into this, it's due to the fact that Craft is now _always_ storing these \"availableAssetSources\" and \"availableTransforms\" keys in the database JSON. This is probably not the right behaviour, but depending on how Craft handle the bug linked above, it may always be the case. I guess the trivial solution would be to add a check for either if the setting is not an empty string, or if the setting is an array.\r\n"}}
{"actor":{"display_login":"spAnser"}}