diff options
| author | Mark Newnham <mark@newnhams.com> | 2021-11-27 15:52:52 -0700 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2022-01-22 23:52:32 +0100 |
| commit | 794f631c362e1b46c907d8a19039b1284c93b285 (patch) | |
| tree | 5a477b3afe2e4d6daeb64d640ca8e6c4ae649aba | |
| parent | 9289a3a89a4f278421af68bfa9739117337bdef4 (diff) | |
| download | adodb-794f631c362e1b46c907d8a19039b1284c93b285.tar.gz adodb-794f631c362e1b46c907d8a19039b1284c93b285.tar.bz2 adodb-794f631c362e1b46c907d8a19039b1284c93b285.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
(cherry picked from commit b3d9a12bb6104b4859700008bb1c1cccadad564e)
| -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 703c2f9f..e3103d78 100644 --- a/adodb.inc.php +++ b/adodb.inc.php @@ -3443,26 +3443,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; } @@ -3509,6 +3515,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); } @@ -3569,22 +3576,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(); } @@ -3669,6 +3681,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1 $this->Close(); } + #[\ReturnTypeWillChange] function getIterator() { return new ADODB_Iterator($this); } |
