Skip to content

Fix element value check#13

Closed
dariuszz123 wants to merge 1 commit intoegzakt:masterfrom
dariuszz123:master
Closed

Fix element value check#13
dariuszz123 wants to merge 1 commit intoegzakt:masterfrom
dariuszz123:master

Conversation

@dariuszz123
Copy link
Copy Markdown

Empty data check for form value should be done by comparing it to null.
Current implementation with empty() check is wrong, because values like "0" are false positive.
For example:

$value = "0";
empty($value); #return true witch obviously is incorrect
(null === $value); #return false witch is correct

@ndenoncourt
Copy link
Copy Markdown
Member

May I ask why you closed this?

@dariuszz123
Copy link
Copy Markdown
Author

Replaced with new PR #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants