Thoul wrote: I ran into a bug with this mod tonight. I'm using mysql4.php, and it seems that the changes to the sql_fetchrowset function do not create the cache correctly. All the rows returned are cached with a value of NULL. Take for example, this code:The cache file created by this is:Code: Select all
$images = $db->sql_fetchrowset($result);
I found two ways to fix this. The first is to rewrite the code to use sql_fetchrow, which works fine. That's not an extremely practical solution for me, as I use sql_fetchrowset in several of my mods and custom codings.Code: Select all
<?php $set = array ( 0 => NULL, 1 => NULL, 2 => NULL, 3 => NULL, 4 => NULL, // I cut the rest out, but you get the idea! 19 lines of NULLs. ); ?>
The second fix is to change this part added by the mod to sql_fetchrowset (be careful that you don't change the part in sql_fetchrow!):I changed it to this, and then the cache was created correctly:Code: Select all
if($this->caching) { if($this->row[$query_id] === false) { $this->write_cache(); } $this->cache[] = $this->row[$query_id]; }
Code: Select all
if($this->caching) { if($this->rowset[$query_id] === false) { $this->write_cache(); } $this->cache[] = $this->rowset[$query_id]; }
is this fix working? because i got still many of this cached files:
Code: Select all
<?php $set = array (
); ?>
