Welcome Guest, Not a member yet? Register   Sign In
Declaration of xxx should be compatible with yyy
#4

The notices have to do with a change to the error reporting levels in the index.php file. The errors were always there, but they were previously being suppressed.

The CI3 DB_driver actually does something similar to what you're looking for:
PHP Code:
    public function call_function($function)
    {
        
$driver = ($this->dbdriver === 'postgre') ? 'pg_' $this->dbdriver.'_';

        if (
FALSE === strpos($driver$function))
        {
            
$function $driver.$function;
        }

        if ( ! 
function_exists($function))
        {
            return (
$this->db_debug) ? $this->display_error('db_unsupported_function') : FALSE;
        }

        return (
func_num_args() > 1)
            ? 
call_user_func_array($functionarray_slice(func_get_args(), 1))
            : 
call_user_func($function);
    } 

From this, I would assume that your example would work as expected.
Reply


Messages In This Thread
RE: Declaration of xxx should be compatible with yyy - by mwhitney - 04-20-2015, 10:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB