zendtech / IbmiToolkit

PHP frontend to XMLSERVICE for IBM i development.
BSD 3-Clause "New" or "Revised" License
46 stars 34 forks source link

Don't assume numeric index #185

Closed alanseiden closed 1 year ago

alanseiden commented 1 year ago

$result[0] could fail with "Undefined array key 0" if the Pdo default fetch mode was associative. Using the reset() function returns the first column, the equivalent of index 0 or whatever the associative key might be. There is only one column to retrieve, so this should always work. Resolves issue #184.