$results = $zdb->execute($select);
$pic = $results->current();
//what's $pic if no result?
- if ( $pic !== false ) {
+ if ( $pic ) {
// we must regenerate the picture file
$file_wo_ext = $this->store_path . $this->id;
file_put_contents(
$results = $zdb->execute($select);
$result = $results->current();
- if ( $result !== false ) {
+ if ( $result ) {
$errors[] = str_replace(
array(
'%s',
$results = $zdb->execute($select);
$result = $results->current();
- if ( $result !== false ) {
+ if ( $result ) {
$d = new \DateTime($result->date_debut_cotis);
return _T("- Membership period overlaps period starting at ") .