Fix PHP warning when saving content element