diff options
| author | Damien Regad <dregad@mantisbt.org> | 2021-11-08 18:36:37 +0100 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2021-11-08 18:36:37 +0100 |
| commit | 3fab283dcccbdf38c341017fa626edd422c1ac46 (patch) | |
| tree | 5abdbd7f36f591d186d1c0639873d78203200c78 /drivers/adodb-postgres7.inc.php | |
| parent | 736d808ffb3aa4a4f09d2ba415caf2e2a39f8f14 (diff) | |
| download | adodb-3fab283dcccbdf38c341017fa626edd422c1ac46.tar.gz adodb-3fab283dcccbdf38c341017fa626edd422c1ac46.tar.bz2 adodb-3fab283dcccbdf38c341017fa626edd422c1ac46.zip | |
Merge _fixblobs() into _prepFields()
Following up on #767, per @Unifex's suggestion [1], removing _fixblobs()
and moving its code into new _prepFields() function.
Additional changes:
- add PHPDoc block
- protected attribute
- remove return type - not really useful as in most cases success is
evaluated by checking $this->fields !== false
- fixed a couple remaining occurrences of is_array() checks
- coding guidelines
[1]: https://github.com/ADOdb/ADOdb/pull/760#issuecomment-961564909
Diffstat (limited to 'drivers/adodb-postgres7.inc.php')
| -rw-r--r-- | drivers/adodb-postgres7.inc.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/adodb-postgres7.inc.php b/drivers/adodb-postgres7.inc.php index 52b59f71..ddbe7a6e 100644 --- a/drivers/adodb-postgres7.inc.php +++ b/drivers/adodb-postgres7.inc.php @@ -300,7 +300,9 @@ class ADORecordSet_postgres7 extends ADORecordSet_postgres64{ $this->_currentRow++; if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) { $this->_prepfields(); - if ($this->fields !== false) return true; + if ($this->fields !== false) { + return true; + } } $this->fields = false; $this->EOF = true; @@ -321,9 +323,13 @@ class ADORecordSet_assoc_postgres7 extends ADORecordSet_postgres64{ return false; } - if ($this->_prepfields()) $this->_updatefields(); + $this->_prepfields(); + if ($this->fields !== false) { + $this->_updatefields(); + return true; + } - return (is_array($this->fields)); + return false; } function MoveNext() |
