Skip to content

Commit

Permalink
Remove unnecessary if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
dregad committed Feb 21, 2021
1 parent 87e5e7f commit 71f4ca9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/cfdefs/cfdef_standard.php
Expand Up @@ -344,10 +344,8 @@ function cfdef_prepare_email_value( $p_value ) {
* @return string
*/
function cfdef_prepare_date_value( $p_value ) {
if( $p_value != null ) {
if( is_numeric( $p_value ) ) {
return date( config_get( 'short_date_format' ), $p_value );
}
if( $p_value && is_numeric( $p_value ) ) {
return date( config_get( 'short_date_format' ), $p_value );
}

return '';
Expand Down

0 comments on commit 71f4ca9

Please sign in to comment.