SQLSTATE[HY093]: Invalid parameter number: number of boun…
https://github.com/lippoliv/piwik-plugin-disabletracking/pull/3 reports
I was getting Error "SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens" when only a site is configured and state changed from disabled to enabled. The problem was that, in that case, join in line 107 returns an empty string, so DB:query inner code considers there is a bind parameter, so the error above is generated. The solution I've chosen is to pass an empty array explicitly when there's no siteIds. Hope it helps. By the way, good job.
another user confirmed that
Hi, I am facing exactly the same issue "SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens" @lippoliv any possibilities to fix it? My plan is to write a video tutorial in order to promote this feature but I cannot promote it with this bug.
I should try to create a test for it