Commit 4c84f8975026979126cf2d936a161c56cfeabc53

Authored by DFNVC
1 parent f35759a7b3
Exists in master

Anpassung für PHP 7. Funktion split() durch preg_split() ersetzt.

Showing 1 changed file with 9 additions and 6 deletions Side-by-side Diff

... ... @@ -173,11 +173,12 @@ function adobe_connection_test($host = '', $port = 80, $username = '',
173 173 echo '<p style="color:#680000">XML response:<br />'. htmlspecialchars($aconnectDOM->_xmlresponse). '</p>';
174 174 }
175 175  
176   - // DFNVC
  176 + // DFNVC
177 177 // Test creating a meeting
178   - //
  178 + //
179 179 echo '<p><b>Test creating a meeting:</b></p>';
180   - list($dummy, $testdomain) = split('@',$username);
  180 + $res = preg_split('/@/',$username);
  181 + $testdomain = $res[1];
181 182  
182 183 $meeting = new stdClass();
183 184 $meeting->name = "MoodleTestMeeting for $testdomain";
... ... @@ -207,14 +208,16 @@ function adobe_connection_test($host = &#39;&#39;, $port = 80, $username = &#39;&#39;,
207 208 echo '<p style="color:#680000">XML response:<br />'. htmlspecialchars($aconnectDOM->_xmlresponse). '</p>';
208 209 }
209 210  
210   - // Test creating a user
  211 + // Test creating a user
211 212 // DFNVC
212 213 //
213 214 echo '<p><b>Test creating a user:</b></p>';
214 215 $user = new stdClass();
215   - list($dummy, $apiuserdomain) = split('@',$username);
  216 + $res = preg_split('/@/',$username);
  217 + $apiuserdomain = $res[1];
  218 +
216 219 $user->email = 'MoodleTestUser@' . $apiuserdomain;
217   - $user->username = $user->email;
  220 + $user->username = $user->email;
218 221 $user->firstname = 'Moodle Test User';
219 222 $user->lastname = 'GROUP';
220 223