Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
798421bb
Commit
798421bb
authored
Feb 02, 2020
by
Carsten Rose
Browse files
Refs #9959. Disable QFQ error handler when QFQ calls T3 code.
parent
c33c1345
Pipeline
#3205
failed with stages
in 1 minute and 56 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Core/Helper/Support.php
View file @
798421bb
...
...
@@ -1572,4 +1572,12 @@ class Support {
return
$formModeGlobal
;
}
/**
* Set QFQ Error Handler.
* Should not be active if T3 code runs.
*/
public
static
function
setQfqErrorHandler
()
{
set_error_handler
(
"
\\
IMATHUZH
\\
Qfq
\\
Core
\\
Exception
\\
ErrorHandler::exception_error_handler"
);
}
}
\ No newline at end of file
extension/Classes/Core/QuickFormQuery.php
View file @
798421bb
...
...
@@ -27,6 +27,7 @@ use IMATHUZH\Qfq\Core\Store\FillStoreForm;
use
IMATHUZH\Qfq\Core\Store\Session
;
use
IMATHUZH\Qfq\Core\Store\Sip
;
use
IMATHUZH\Qfq\Core\Store\Store
;
use
IMATHUZH\Qfq\Core\Typo3\T3Handler
;
/*
* Form will be called
...
...
@@ -129,7 +130,8 @@ class QuickFormQuery {
// Refresh the session even if no new data saved.
Session
::
set
(
SESSION_LAST_ACTIVITY
,
time
());
set_error_handler
(
"
\\
IMATHUZH
\\
Qfq
\\
Core
\\
Exception
\\
ErrorHandler::exception_error_handler"
);
Support
::
setQfqErrorHandler
();
// PHPExcel
set_include_path
(
get_include_path
()
.
PATH_SEPARATOR
.
'../../Resources/Private/Classes/'
);
...
...
@@ -242,6 +244,8 @@ class QuickFormQuery {
public
function
process
()
{
$html
=
''
;
T3Handler
::
getT3QfqConfig
();
if
(
$this
->
store
->
getVar
(
TYPO3_DEBUG_SHOW_BODY_TEXT
,
STORE_TYPO3
)
===
'yes'
)
{
$htmlId
=
HelperFormElement
::
buildFormElementId
(
$this
->
formSpec
[
F_ID
],
0
,
0
,
0
);
$html
.
=
Support
::
doTooltip
(
$htmlId
.
HTML_ID_EXTENSION_TOOLTIP
,
$this
->
t3data
[
'bodytext'
]);
...
...
extension/Classes/Core/Typo3/T3Handler.php
View file @
798421bb
...
...
@@ -8,6 +8,8 @@
namespace
IMATHUZH\Qfq\Core\Typo3
;
use
IMATHUZH\Qfq\Core\Helper\Support
;
/**
* Class T3Handler
...
...
@@ -15,6 +17,11 @@ namespace IMATHUZH\Qfq\Core\Typo3;
*/
class
T3Handler
{
/**
* @var
*/
private
static
$objectManager
=
null
;
/**
* Call logoff of current FE User
*/
...
...
@@ -84,4 +91,29 @@ class T3Handler {
}
}
}
public
static
function
getT3QfqConfig
()
{
restore_error_handler
();
// if(!isset(self::$objectManager)) {
// self::$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
// }
//
// // https://blog.slavlee.de/67-wissen/quick-tips/85-klassen-in-extbase-instanziieren-ueberall.html
// $configurationUtility = self::$objectManager->get('TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility');
// $extensionConfiguration = $configurationUtility->getCurrentConfiguration('qfq');
$configurationManager
=
\
TYPO3\CMS\Core\Utility\GeneralUtility
::
makeInstance
(
'TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager'
);
$configAll
=
$configurationManager
->
getLocalConfiguration
();
$configQfq
=
unserialize
(
$configAll
[
'EXT'
][
'extConf'
][
'qfq'
]);
$configQfq
[
'flagProduction'
]
=
'yes'
;
$configAll
[
'EXT'
][
'extConf'
][
'qfq'
]
=
serialize
(
$configQfq
);
$configurationManager
->
writeLocalConfiguration
(
$configAll
);
Support
::
setQfqErrorHandler
();
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment