Connections-Business-Directory / Connections

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

std::$latitude not set, header already sent fault error #314

Closed quantumJLBass closed 10 years ago

quantumJLBass commented 10 years ago

I had to change https://github.com/shazahm1/Connections/blob/develop/includes/class.entry-actions.php#L549

from

if ( ! empty( $result ) ) {

to

if ( ! empty( $result ) && !empty($result->latitude) && !empty($result->longitude)) {

in order to proceed forward. I figured to check for both was best in this case.

shazahm1 commented 10 years ago

Ahhh, yes, funny or not so funny thing is ... after I pushed the other pug fix last night I ran into this and fix it. I just hadn't updated gh yet.

quantumJLBass commented 10 years ago

lol. well at least it's getting a good bug review

shazahm1 commented 10 years ago

I think I'm going to use isset() rather than !empty() checks instead. Two reasons, coords 0, 0 would be valid even though completely unlike since that is iff the coast of Africa if I remember correctly. Second reason, it's possible the that Maps API might not return those values at all.

shazahm1 commented 10 years ago

Fixed via 4fb2fdc02442f8bc16423e10664bc264faba78b5

quantumJLBass commented 10 years ago

that makes sense on the empty to isset