Rewrite conditions for photo linked item to prevent crash on old photos
Rewrite conditions for photo linked item to prevent crash on old photos

- Addresses https://github.com/friendica/friendica/issues/7297#issuecomment-509064260

annando/friendica,fabrixxm/friendica,fabrixxm/friendica,tobiasd/friendica,friendica/friendica,fabrixxm/friendica,fabrixxm/friendica,annando/friendica,tobiasd/friendica,annando/friendica,tobiasd/friendica,friendica/friendica,fabrixxm/friendica,friendica/friendica,friendica/friendica,tobiasd/friendica,tobiasd/friendica,annando/friendica,friendica/friendica,annando/friendica