mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Filter error location in JSON and XML responses
This commit is contained in:
parent
1f9fe48170
commit
6a43274826
2 changed files with 23 additions and 0 deletions
|
|
@ -57,6 +57,19 @@ class DisplayHandler extends Handler
|
||||||
$handler = new HTMLDisplayHandler();
|
$handler = new HTMLDisplayHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle error location info
|
||||||
|
if ($location = $oModule->get('rx_error_location'))
|
||||||
|
{
|
||||||
|
if (!Rhymix\Framework\Debug::isEnabledForCurrentUser())
|
||||||
|
{
|
||||||
|
$oModule->unset('rx_error_location');
|
||||||
|
}
|
||||||
|
elseif (starts_with(\RX_BASEDIR, $location))
|
||||||
|
{
|
||||||
|
$oModule->add('rx_error_location', $location = substr($location, strlen(\RX_BASEDIR)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$output = $handler->toDoc($oModule);
|
$output = $handler->toDoc($oModule);
|
||||||
|
|
||||||
// call a trigger before display
|
// call a trigger before display
|
||||||
|
|
|
||||||
|
|
@ -280,6 +280,16 @@ class BaseObject
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method to delete a key
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function unset($key)
|
||||||
|
{
|
||||||
|
unset($this->variables[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to return either true or false depnding on the value in a 'error' variable
|
* Method to return either true or false depnding on the value in a 'error' variable
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue