MDL-51784 general: Adding missing php4 style constructors

Adding them to warn people calling the php4 constructor.
This commit is contained in:
David Monllao
2015-12-11 14:02:42 +08:00
parent c4d0b752a2
commit 9e313e798f
18 changed files with 248 additions and 5 deletions
+31 -1
View File
@@ -319,7 +319,17 @@ class ouwiki_line {
}
}
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*
* @deprecated since Moodle 3.1
*/
public function ouwiki_line($data, $linepos) {
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
self::__construct($data, $linepos);
}
/**
* @return string Normalised string representation of this line object
*/
@@ -372,6 +382,16 @@ class ouwiki_word {
$this->word=$word;
$this->start=$start;
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*
* @deprecated since Moodle 3.1
*/
public function ouwiki_word($word, $start) {
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
self::__construct($word, $start);
}
}
/**
@@ -511,6 +531,16 @@ class ouwiki_changes {
}
}
/**
* Old syntax of class constructor. Deprecated in PHP7.
*
* @deprecated since Moodle 3.1
*/
public function ouwiki_changes($diff, $count2) {
debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
self::__construct($diff, $count2);
}
/**
* Find deleted lines. These are lines in file1 that
* cannot be present even in modified form in file2