MDL-32786 E_STRICT: fix warning when creating a new service.
[moodle.git] / admin / webservice / forms.php
index db996f8..13e1c3d 100644 (file)
@@ -56,7 +56,7 @@ class external_service_form extends moodleform {
 
     function definition() {
         $mform = $this->_form;
-        $service = $this->_customdata;
+        $service = isset($this->_customdata) ? $this->_customdata : new stdClass();
 
         $mform->addElement('header', 'extservice',
                 get_string('externalservice', 'webservice'));