diff options
| author | Mark Newnham <mark@newnhams.com> | 2021-11-27 15:52:52 -0700 |
|---|---|---|
| committer | Mark Newnham <mark@newnhams.com> | 2021-11-27 15:52:52 -0700 |
| commit | b3d9a12bb6104b4859700008bb1c1cccadad564e (patch) | |
| tree | f60ff1a7d5ffc56fd3f87aea905629910099dcb4 | |
| parent | fbbac2b0c3ee070cf54a3afca6c89a0d5c1b477d (diff) | |
| download | adodb-b3d9a12bb6104b4859700008bb1c1cccadad564e.tar.gz adodb-b3d9a12bb6104b4859700008bb1c1cccadad564e.tar.bz2 adodb-b3d9a12bb6104b4859700008bb1c1cccadad564e.zip | |
Methods return E_DEPRECATED with PHP8.1, see #771
Implemented methods that return a different type to the PHP abstract need the warnings suppressed in PHP8.1. This is done using the #[\ReturnTypeWillChange] attribute.
https://wiki.php.net/rfc/internal_method_return_types
| -rw-r--r-- | adodb.inc.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/adodb.inc.php b/adodb.inc.php index ea971b8a..0f97e9b6 100644 --- a/adodb.inc.php +++ b/adodb.inc.php @@ -3638,26 +3638,32 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1 $this->rs = $rs; } + #[\ReturnTypeWillChange] function rewind() {} + #[\ReturnTypeWillChange] function valid() { return !$this->rs->EOF; } + #[\ReturnTypeWillChange] function key() { return false; } + #[\ReturnTypeWillChange] function current() { return false; } + #[\ReturnTypeWillChange] function next() {} function __call($func, $params) { return call_user_func_array(array($this->rs, $func), $params); } + #[\ReturnTypeWillChange] function hasMore() { return false; } @@ -3704,6 +3710,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1 function Init() {} + #[\ReturnTypeWillChange] function getIterator() { return new ADODB_Iterator_empty($this); } @@ -3763,22 +3770,27 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1 $this->rs = $rs; } + #[\ReturnTypeWillChange] function rewind() { $this->rs->MoveFirst(); } + #[\ReturnTypeWillChange] function valid() { return !$this->rs->EOF; } + #[\ReturnTypeWillChange] function key() { return $this->rs->_currentRow; } + #[\ReturnTypeWillChange] function current() { return $this->rs->fields; } + #[\ReturnTypeWillChange] function next() { $this->rs->MoveNext(); } @@ -3868,6 +3880,7 @@ class ADORecordSet implements IteratorAggregate { $this->Close(); } + #[\ReturnTypeWillChange] function getIterator() { return new ADODB_Iterator($this); } |
