MDL-32786 E_STRICT: fix warning when creating a new service.
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 4 May 2012 10:44:10 +0000 (12:44 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 4 May 2012 10:44:10 +0000 (12:44 +0200)
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'));