mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Fixing E_STRICT compliance in simpletest
This commit is contained in:
parent
41433f1211
commit
972dfee5c3
4
thirdparty/simpletest/compatibility.php
vendored
4
thirdparty/simpletest/compatibility.php
vendored
@ -19,7 +19,7 @@ class SimpleTestCompatibility {
|
|||||||
* @access public
|
* @access public
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function copy($object) {
|
static function copy($object) {
|
||||||
if (version_compare(phpversion(), '5') >= 0) {
|
if (version_compare(phpversion(), '5') >= 0) {
|
||||||
eval('$copy = clone $object;');
|
eval('$copy = clone $object;');
|
||||||
return $copy;
|
return $copy;
|
||||||
@ -170,4 +170,4 @@ class SimpleTestCompatibility {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
4
thirdparty/simpletest/form.php
vendored
4
thirdparty/simpletest/form.php
vendored
@ -120,7 +120,7 @@ class SimpleForm {
|
|||||||
$class = $this->_encoding;
|
$class = $this->_encoding;
|
||||||
$encoding = new $class();
|
$encoding = new $class();
|
||||||
for ($i = 0, $count = count($this->_widgets); $i < $count; $i++) {
|
for ($i = 0, $count = count($this->_widgets); $i < $count; $i++) {
|
||||||
$this->_widgets[$i]->write($encoding);
|
$this->_widgets[$i]->write($encoding, 0, 0);
|
||||||
}
|
}
|
||||||
return $encoding;
|
return $encoding;
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ class SimpleForm {
|
|||||||
foreach ($this->_buttons as $button) {
|
foreach ($this->_buttons as $button) {
|
||||||
if ($selector->isMatch($button)) {
|
if ($selector->isMatch($button)) {
|
||||||
$encoding = $this->_encode();
|
$encoding = $this->_encode();
|
||||||
$button->write($encoding);
|
$button->write($encoding, 0, 0);
|
||||||
if ($additional) {
|
if ($additional) {
|
||||||
$encoding->merge($additional);
|
$encoding->merge($additional);
|
||||||
}
|
}
|
||||||
|
2
thirdparty/simpletest/page.php
vendored
2
thirdparty/simpletest/page.php
vendored
@ -980,4 +980,4 @@ class SimplePage {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
6
thirdparty/simpletest/parser.php
vendored
6
thirdparty/simpletest/parser.php
vendored
@ -690,7 +690,7 @@ class SimpleHtmlSaxParser {
|
|||||||
* @access public
|
* @access public
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function decodeHtml($html) {
|
static function decodeHtml($html) {
|
||||||
return html_entity_decode($html, ENT_QUOTES);
|
return html_entity_decode($html, ENT_QUOTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -703,7 +703,7 @@ class SimpleHtmlSaxParser {
|
|||||||
* @access public
|
* @access public
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function normalise($html) {
|
static function normalise($html) {
|
||||||
$text = preg_replace('|<!--.*?-->|', '', $html);
|
$text = preg_replace('|<!--.*?-->|', '', $html);
|
||||||
$text = preg_replace('|<script[^>]*>.*?</script>|', '', $text);
|
$text = preg_replace('|<script[^>]*>.*?</script>|', '', $text);
|
||||||
$text = preg_replace('|<img[^>]*alt\s*=\s*"([^"]*)"[^>]*>|', ' \1 ', $text);
|
$text = preg_replace('|<img[^>]*alt\s*=\s*"([^"]*)"[^>]*>|', ' \1 ', $text);
|
||||||
@ -761,4 +761,4 @@ class SimpleSaxListener {
|
|||||||
function addContent($text) {
|
function addContent($text) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
6
thirdparty/simpletest/tag.php
vendored
6
thirdparty/simpletest/tag.php
vendored
@ -325,7 +325,7 @@ class SimpleWidget extends SimpleTag {
|
|||||||
* @param SimpleEncoding $encoding Form packet.
|
* @param SimpleEncoding $encoding Form packet.
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function write(&$encoding) {
|
function write(&$encoding, $x, $y) {
|
||||||
if ($this->getName()) {
|
if ($this->getName()) {
|
||||||
$encoding->add($this->getName(), $this->getValue());
|
$encoding->add($this->getName(), $this->getValue());
|
||||||
}
|
}
|
||||||
@ -680,7 +680,7 @@ class SimpleUploadTag extends SimpleWidget {
|
|||||||
* @param SimpleEncoding $encoding Form packet.
|
* @param SimpleEncoding $encoding Form packet.
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function write(&$encoding) {
|
function write(&$encoding, $x, $y) {
|
||||||
if (! file_exists($this->getValue())) {
|
if (! file_exists($this->getValue())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1415,4 +1415,4 @@ class SimpleFrameTag extends SimpleTag {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user