Sometimes when using the iPhone to take a picture, the picture will not save. Operating the camera seems perfectly normal, but when you go to the Camera Roll you see only a blank square where the picture should be. This error is not particular to any certain version of the iPhone OS, and running updates, resetting the phone, even a hard reset, will not solve the problem. Here's what you have to do.
Make a backup: Sync your iPhone with iTunes and make a backup. Be sure to back up your photos to iPhoto if you're on a Mac, or transfer your photos on to your PC as you normally do.
Disconnect your iPhone from the computer once you're sure you've backed up your iPhone.
Do a "hard reset" on your iPhone. This will completely wipe everything off your iPhone. All data and settings will be gone. Don't worry; you'll get them back later from the backup you just made.
On the iPhone go to Settings > General > Reset > Erase All Content And Settings. It will give you a warning. Hit "Erase iPhone."
The iPhone will now show you an Apple logo and a progress bar. Once it's finished it will tell you that the iPhone has been activated. You now have a completely blank iPhone.
Reconnect the iPhone to iTunes. It will ask you if you want to restore your software. Click the button to Restore. When it is finished it will restart the phone and ask if you want to restore a backup. DO NOT restore the backup and disconnect the iPhone from the computer.
Note: If you did restore the backup, the problem will not be fixed and you'll have to start all of the steps over.
Try to take a picture and then check the Camera Roll. You should see the picture, and not a blank square anymore.
Reconnect the iPhone to the computer. Still, DO NOT restore the backup yet. Open iPhoto and import the photo choosing "Keep Originals." Do not delete the photo.
Now you can restore your iPhone backup. All of the personal information that was previously deleted should be restored and you should be able to take pictures normally again.
Let's say that you find out that this is happening to you, but you are nowhere near your computer and there is a picture you absolutely have to take. Open up the camera, aim, and instead of hit the camera icon, hold down the Home button and tap the Sleep/Awake button once. Wow, it worked! What you just did is essentially took a screen shot on your iPhone. And because your camera was what was on the screen at the time, you also just took the picture.
Results may vary. If this doesn't fix your iPhone, head on over to your local Apple Store Genius Bar & they may be able to help.