# ZF3 problem with Db/Table/Abstract.php

**URL:** https://discourse.laminas.dev/t/zf3-problem-with-db-table-abstract-php/623
**Category:** Components & MVC
**Created:** [June 17, 2018, 3:43pm UTC](https://discourse.laminas.dev/t/zf3-problem-with-db-table-abstract-php/623 "2018-06-17T15:43:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![PX03AFK](https://avatars.discourse-cdn.com/v4/letter/p/8baadc/32.png) [@PX03AFK](https://discourse.laminas.dev/u/PX03AFK)
#### Post date: [June 17, 2018, 3:43pm UTC](https://discourse.laminas.dev/t/zf3-problem-with-db-table-abstract-php/623/1 "2018-06-17T15:43:45Z")

</div>

I have recently upgraded my O/S to OpenSuse Leap 15.0 and that installed PHP7 and Zend 3.2.0. I use bacula for backups and have webacula as a browser front end. I had some problems even getting this to work but eventually found ways around the problems but then I was getting two messages which seem to indicate bugs in the Zend framework. I am going to post separate reports for each.

This is about Db/Table/Abstract.php which comes up with a message that count() is using the wrong type of component. At line 1307 there is the code:  
'$keyValuesCount = count($keyValues);  
which is causing the error. Immediately following this is a test to check whether $keyValues is an array and if not to convert to an array. By moving the line that causes the error to follow the test the error is avoided.

---

<div class="post-metadata">

### Author: ![ocramius](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/ocramius/32/23_2.png) [@ocramius](https://discourse.laminas.dev/u/ocramius)
#### Post date: [June 17, 2018, 4:04pm UTC](https://discourse.laminas.dev/t/zf3-problem-with-db-table-abstract-php/623/2 "2018-06-17T16:04:50Z")

</div>

Hey David,

Can you maybe make a code example of a failure? What is the specific zend-db version?
