* zin: refactor.
This commit is contained in:
@@ -2964,7 +2964,9 @@ class baseRouter
|
||||
if(!empty($this->config->debug) && $this->config->debug > 1)
|
||||
{
|
||||
/* Send non-serious errors to page in zin mode. */
|
||||
if((isset($this->config->zin) || isset($_SERVER['HTTP_X_ZIN_OPTIONS'])) && ($level !== E_ERROR && $level !== E_PARSE && $level !== E_CORE_ERROR && $level !== E_COMPILE_ERROR))
|
||||
$isZinRequest = isset($this->config->zin) || isset($_SERVER['HTTP_X_ZIN_OPTIONS']);
|
||||
$isNonSeriousError = $level !== E_ERROR && $level !== E_PARSE && $level !== E_CORE_ERROR && $level !== E_COMPILE_ERROR;
|
||||
if($isZinRequest && $isNonSeriousError)
|
||||
{
|
||||
$this->zinErrors[] = array('file' => $file, 'line' => $line, 'message' => $message, 'level' => $level);
|
||||
return;
|
||||
|
||||
@@ -528,7 +528,10 @@ class wg
|
||||
$definedProps = static::getDefinedProps();
|
||||
foreach($definedProps as $name => $definition)
|
||||
{
|
||||
if($this->hasProp($name) || (isset($definition['default']) && $definition['default'] !== null) || (isset($definition['optional']) && $definition['optional'])) continue;
|
||||
if($this->hasProp($name)) continue;
|
||||
if(isset($definition['default']) && $definition['default'] !== null) continue;
|
||||
if(isset($definition['optional']) && $definition['optional']) continue;
|
||||
|
||||
trigger_error("[ZIN] The property \"$name: {$definition['type']}\" of widget \"{$this->type()}#$this->gid\" is required.", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user