BUGFIX: Remove possibility of E_NOTICE in updatetreenodes().

This commit is contained in:
madmatt 2014-01-13 17:47:33 +13:00
parent 0b22ca6c59
commit 77c35e7bde

View File

@ -928,6 +928,8 @@ class LeftAndMain extends Controller implements PermissionProvider {
$data = array(); $data = array();
$ids = explode(',', $request->getVar('ids')); $ids = explode(',', $request->getVar('ids'));
foreach($ids as $id) { foreach($ids as $id) {
if($id === "") continue; // $id may be a blank string, which is invalid and should be skipped over
$record = $this->getRecord($id); $record = $this->getRecord($id);
$recordController = ($this->stat('tree_class') == 'SiteTree') $recordController = ($this->stat('tree_class') == 'SiteTree')
? singleton('CMSPageEditController') ? singleton('CMSPageEditController')