initialized $site with new stdClass() before assigning fields

This commit is contained in:
hyung-hwan 2019-02-01 16:16:40 +00:00
parent 3316cf8b3f
commit 4caccffdfe
2 changed files with 3 additions and 0 deletions

View File

@ -227,6 +227,7 @@ class Site extends Controller
// recompose the site information from POST data.
unset ($site);
$site = new stdClass();
$site->id = $tmpid;
$site->name = $this->input->post('site_name');
@ -290,6 +291,7 @@ class Site extends Controller
}
else
{
$site = new stdClass();
$site->id = $siteid;
$site->name = '';
$site->summary = '';

View File

@ -26,6 +26,7 @@
<!---------------------------------------------------------------------------->
<?php
$site = new stdClass();
$site->id = '';
$site->name = '';
$site->text = '';