Commit cd5a252e authored by Carsten  Rose's avatar Carsten Rose
Browse files

AbstractException.php: fixed problem with htmlEntities() on link to 'Edit...

AbstractException.php: fixed problem with htmlEntities() on link to 'Edit Form' and 'Edit FormElement'.
parent ccb11642
Pipeline #725 passed with stage
in 2 minutes and 4 seconds
......@@ -54,6 +54,7 @@ class AbstractException extends \Exception {
$arrShow = $this->messageArray;
$htmlDebug = '';
$arrDebugShow = array();
$editForm='';
try {
// In a very early stage, it might be possible that Store can't be initialized: take care not to use it.
......@@ -117,15 +118,16 @@ class AbstractException extends \Exception {
// edit the broken form will be helpful.
$storeSystem = $store->getStore(STORE_SYSTEM);
if (!empty($storeSystem[SYSTEM_FORM])) {
$arrDebugShow[EXCEPTION_EDIT_FORM] = $this->buildFormLink($storeSystem);
$editForm = $this->buildFormLink($storeSystem);
}
$htmlDebug = OnArray::arrayToHtmlTable(OnArray::htmlentitiesOnArray(array_merge($arrMsg, $arrDebugShow)), 'Debug', EXCEPTION_TABLE_CLASS);
$htmlDebug = OnArray::arrayToHtmlTable(
array_merge(OnArray::htmlentitiesOnArray(array_merge($arrMsg, $arrDebugShow)), [ 'Edit' => $editForm ]), 'Debug', EXCEPTION_TABLE_CLASS);
$htmlDebug = str_replace("\n", "<br>", $htmlDebug);
$arrDebugHiddenClean = OnArray::htmlentitiesOnArray($arrDebugHidden);
$arrDebugHiddenClean[EXCEPTION_STACKTRACE] = implode($arrTrace, '<br>');
$arrDebugHiddenClean[EXCEPTION_EDIT_FORM] = implode($arrTrace, '<br>');
$hidden = OnArray::arrayToHtmlTable($arrDebugHiddenClean, 'Details', EXCEPTION_TABLE_CLASS);
// Show / hide with just CSS: http://jsfiddle.net/t5Nf8/1/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment