Skip to content

Commit

Permalink
Fix for empty attributes in POST
Browse files Browse the repository at this point in the history
  • Loading branch information
juek committed Jan 29, 2017
1 parent 1602e70 commit c4880cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CustomSections.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ public static function SaveSection($return, $section, $type){
if( array_key_exists($type, $section_types) ){
global $page;
$page->file_sections[$section]['values'] = & $_POST['values'];
$page->file_sections[$section]['attributes'] = & $_POST['attributes'];
if( !empty($_POST['attributes']) && is_array($_POST['attributes']) ){
$page->file_sections[$section]['attributes'] = & $_POST['attributes'];
}
$page->file_sections[$section]['content'] = & $_POST['gpcontent'];
return true;
}
Expand Down

0 comments on commit c4880cd

Please sign in to comment.