1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 01:34:31 +02:00

Update wireEmpty() function so that it also returns false when giving a NullPage or NullField object. Add WireNull interface for future Null objects.

This commit is contained in:
Ryan Cramer
2020-01-13 08:48:06 -05:00
parent 321ea0eed3
commit 0a1ec95a33
4 changed files with 10 additions and 2 deletions

View File

@@ -10,7 +10,7 @@
*
*/
class NullField extends Field {
class NullField extends Field implements WireNull {
public function get($key) {
if($key == 'id') return 0;
if($key == 'name') return '';