Issue Bug Closed

#59994PHP Warning: BackendUtility::getProcessedValue(); ksort() expects parameter 1 to be array

Christian Riedler 06/30/14, 12:40 updated 10/02/18, 11:54

Description

When showing mm relation field with MM_opposite_field in list view you can get a warning:

> #1: PHP Warning: ksort() expects parameter 1 to be array, null given in /media/Data/Websites/LangLang/reger.de/orderlist/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 2075 (More information)

This could be easyly avoided when moving the ksort() one line down, within the is_array() check:

//ksort($mmlA);     // causes a error when showing mm bidirectional field in list
if (is_array($mmlA)) {
    ksort($mmlA);     // moved here                                                               
    $l = implode('; ', $mmlA);
} else {
    $l = 'N/A';
}

Reviews 2