Connections-Business-Directory / Connections

Directory Plugin for WordPress
https://connections-pro.com
GNU General Public License v2.0
27 stars 18 forks source link

vCard Image Error #430

Closed shazahm1 closed 9 years ago

shazahm1 commented 9 years ago

When downloading a vCard when there is no logo and or photo it will fail. The error is here:

https://github.com/Connections-Business-Directory/Connections/blob/8.1.5/includes/entry/class.entry-data.php#L3296

The methods getLogoName() and getImageNameOriginal() can will return NULL so the path returned by getOriginalImagePath() will not be valid. It is this path that is used to open the image content which is base64 encoded in the vCard.

The fix should be to first check the path to see if the file exists and return FALSE if it does not.

shazahm1 commented 9 years ago

Fixed by the following commits: