Decode JSON to arrays instead of objects
This commit is contained in:
parent
7e0d5206be
commit
b7bba19257
|
@ -286,7 +286,7 @@ class tx_dlf_collection extends tx_dlf_plugin {
|
|||
}
|
||||
|
||||
// Prepare document's metadata.
|
||||
$metadata = json_decode($resArray['metadata']);
|
||||
$metadata = json_decode($resArray['metadata'], TRUE);
|
||||
|
||||
if (!empty($metadata['type'][0]) && t3lib_div::testInt($metadata['type'][0])) {
|
||||
|
||||
|
@ -315,7 +315,7 @@ class tx_dlf_collection extends tx_dlf_plugin {
|
|||
}
|
||||
|
||||
// Prepare document's metadata for sorting.
|
||||
$sorting = json_decode($resArray['metadata_sorting']);
|
||||
$sorting = json_decode($resArray['metadata_sorting'], TRUE);
|
||||
|
||||
if (!empty($sorting['type']) && t3lib_div::testInt($sorting['type'])) {
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ class tx_dlf_search extends tx_dlf_plugin {
|
|||
$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
|
||||
|
||||
// Prepare document's metadata.
|
||||
$metadata = json_decode($resArray['metadata']);
|
||||
$metadata = json_decode($resArray['metadata'], TRUE);
|
||||
|
||||
if (!empty($metadata['type'][0]) && t3lib_div::testInt($metadata['type'][0])) {
|
||||
|
||||
|
@ -349,7 +349,7 @@ class tx_dlf_search extends tx_dlf_plugin {
|
|||
}
|
||||
|
||||
// Prepare document's metadata for sorting.
|
||||
$sorting = json_decode($resArray['metadata_sorting']);
|
||||
$sorting = json_decode($resArray['metadata_sorting'], TRUE);
|
||||
|
||||
if (!empty($sorting['type']) && t3lib_div::testInt($sorting['type'])) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue