Decode JSON to arrays instead of objects

This commit is contained in:
Sebastian Meyer 2012-08-07 14:22:42 +02:00
parent 7e0d5206be
commit b7bba19257
2 changed files with 4 additions and 4 deletions

View File

@ -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'])) {

View File

@ -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'])) {