MINOR Fixing E_STRICT compliance in simpletest

This commit is contained in:
Sean Harvey 2012-04-12 12:06:47 +12:00
parent 41433f1211
commit 972dfee5c3
5 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@ class SimpleTestCompatibility {
* @access public
* @static
*/
function copy($object) {
static function copy($object) {
if (version_compare(phpversion(), '5') >= 0) {
eval('$copy = clone $object;');
return $copy;
@ -170,4 +170,4 @@ class SimpleTestCompatibility {
}
}
}
?>
?>

View File

@ -120,7 +120,7 @@ class SimpleForm {
$class = $this->_encoding;
$encoding = new $class();
for ($i = 0, $count = count($this->_widgets); $i < $count; $i++) {
$this->_widgets[$i]->write($encoding);
$this->_widgets[$i]->write($encoding, 0, 0);
}
return $encoding;
}
@ -305,7 +305,7 @@ class SimpleForm {
foreach ($this->_buttons as $button) {
if ($selector->isMatch($button)) {
$encoding = $this->_encode();
$button->write($encoding);
$button->write($encoding, 0, 0);
if ($additional) {
$encoding->merge($additional);
}

View File

@ -980,4 +980,4 @@ class SimplePage {
return null;
}
}
?>

View File

@ -690,7 +690,7 @@ class SimpleHtmlSaxParser {
* @access public
* @static
*/
function decodeHtml($html) {
static function decodeHtml($html) {
return html_entity_decode($html, ENT_QUOTES);
}
@ -703,7 +703,7 @@ class SimpleHtmlSaxParser {
* @access public
* @static
*/
function normalise($html) {
static function normalise($html) {
$text = preg_replace('|<!--.*?-->|', '', $html);
$text = preg_replace('|<script[^>]*>.*?</script>|', '', $text);
$text = preg_replace('|<img[^>]*alt\s*=\s*"([^"]*)"[^>]*>|', ' \1 ', $text);
@ -761,4 +761,4 @@ class SimpleSaxListener {
function addContent($text) {
}
}
?>

View File

@ -325,7 +325,7 @@ class SimpleWidget extends SimpleTag {
* @param SimpleEncoding $encoding Form packet.
* @access public
*/
function write(&$encoding) {
function write(&$encoding, $x, $y) {
if ($this->getName()) {
$encoding->add($this->getName(), $this->getValue());
}
@ -680,7 +680,7 @@ class SimpleUploadTag extends SimpleWidget {
* @param SimpleEncoding $encoding Form packet.
* @access public
*/
function write(&$encoding) {
function write(&$encoding, $x, $y) {
if (! file_exists($this->getValue())) {
return;
}
@ -1415,4 +1415,4 @@ class SimpleFrameTag extends SimpleTag {
return false;
}
}
?>