Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
TYPO3
lfeditor
Commits
c9e4d041
Unverified
Commit
c9e4d041
authored
Mar 12, 2018
by
Oliver Eglseder
Browse files
[BUGFIX] Make unserialize call PHP5 compliant (fixes #17)
parent
bf9d8480
Changes
2
Hide whitespace changes
Inline
Side-by-side
Classes/Controller/AbstractBackendController.php
View file @
c9e4d041
...
...
@@ -182,7 +182,11 @@ abstract class AbstractBackendController extends AbstractController {
'override'
=>
LocalizationUtility
::
translate
(
'select.editingMode.override'
,
'lfeditor'
),
);
$backendConfiguration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
'lfeditor'
],
[]);
if
(
7
===
PHP_MAJOR_VERSION
)
{
$backendConfiguration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
'lfeditor'
],
[]);
}
else
{
$backendConfiguration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
'lfeditor'
]);
}
if
(
isset
(
$backendConfiguration
[
'editModeExtension'
])
&&
((
int
)
$backendConfiguration
[
'editModeExtension'
])
===
0
)
{
unset
(
$editingModeOptions
[
'extension'
]);
}
...
...
Classes/Service/LicensingService.php
View file @
c9e4d041
...
...
@@ -54,7 +54,15 @@ class LicensingService {
public
static
function
checkKey
():
bool
{
if
(
static
::
$isLicenseKeyValid
===
NULL
)
{
static
::
$isLicenseKeyValid
=
FALSE
;
$configuration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
self
::
EXTENSION_KEY
],
[
FALSE
]);
if
(
7
===
PHP_MAJOR_VERSION
)
{
$configuration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
self
::
EXTENSION_KEY
],
[
false
]
);
}
else
{
$configuration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
self
::
EXTENSION_KEY
]);
}
if
(
isset
(
$configuration
[
'key'
])
&&
$key
=
trim
(
$configuration
[
'key'
]))
{
static
::
$isLicenseKeyValid
=
(
bool
)
preg_match
(
'/^([A-Z\d]{6}-?){4}$/'
,
$key
);
}
...
...
@@ -71,7 +79,14 @@ class LicensingService {
*/
public
static
function
ping
(
$returnUrl
=
FALSE
):
string
{
try
{
$configuration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
self
::
EXTENSION_KEY
],
[
FALSE
]);
if
(
7
===
PHP_MAJOR_VERSION
)
{
$configuration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
self
::
EXTENSION_KEY
],
[
false
]
);
}
else
{
$configuration
=
unserialize
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'EXT'
][
'extConf'
][
self
::
EXTENSION_KEY
]);
}
$key
=
''
;
if
(
isset
(
$configuration
[
'key'
]))
{
$key
=
trim
(
$configuration
[
'key'
]);
...
...
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