GitHub user cjpearson opened a pull request: https://github.com/apache/cordova-plugins/pull/26
CB-11643: return after sending error ### Platforms affected iOS ### What does this PR do? After an error is returned, we should return and not process the request. Continuing to process the request can cause a crash. ### What testing has been done on this change? Tested on a device with the sample app, adding the following code. ``` document.getElementById("deviceready").addEventListener("click", function buttonClick() { var fail = function () { console.log("failure"); } var photoSuccess = function (uri) { var img = document.createElement("img"); debugger; img.src = uri; document.getElementById("deviceready").appendChild(img); }; navigator.camera.getPicture(photoSuccess, fail, { destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.CAMERA, saveToPhotoAlbum: false }); }); ``` ### Checklist - [X] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to secret...@apache.org. - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. - [] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/cjpearson/cordova-plugins webserver-crash Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugins/pull/26.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #26 ---- commit 2568693862556a712fdf760487a9d3f6f0ffb5f9 Author: Connor Pearson <cjp...@gmail.com> Date: 2016-07-29T14:15:01Z CB-11643: return after sending error ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org