!ignoreProtected would validate a constant. Haven't checked the details but I'd expect a variable check like !empty($ignoreProtected). You could also set $ignoreProtected = null and do an !isset($ignoreProtected) instead.