I have a model with two functions, like this:
<?php
class FotoModel extends CI_Model
{
function __construct()
{
parent::__construct();
}
function getFotosByCat($cat)
{
$this->load->helper("file");
switch($cat)
{
case "bloemen" : return get_filenames("/images/foto/bloemen/");
case "dieren" : return get_filenames("/images/foto/dieren/");
case "andere" : return get_filenames("/images/foto/andere/");
}
}
public function getFotoLinksByCat($cat)
{
$fileNames = getFotosByCat($cat);
//i do stuff with $fileNames and provide a return statment..
}
}
?>
I load the model in my controller and tested the second method with some static data for $fileNames and everything works fine. Only when I make a call to the first function (the one with the switch/case statement) from the second (as seen in the code-example) I get an error.
And the thing is I don't even get to see what kind of error. It is because of testing and trying that I know the error MUST be in the first function. Anyone that can help me to solve this one?
get_filenames. Can you post that code?get_filenamesis a function from CI's file helper