Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] the files function when called cannot get a file from input field #3

Open
otengkwame opened this issue Jan 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@otengkwame
Copy link
Contributor

Inside the ci_core_helper.php the files function has a bug when called

// example when calling it in a controller
$avatar = files('avatar');
if ( ! function_exists('files')) 
{
    /**
     * function to get $_FILES values
     *
     * @param string $index
     * @return array|string
     */
    function files($index = '')
    {
        if ($index !== '') {
            return $_FILES[$index];
        }

        return $_FILES;
    }
}
@otengkwame otengkwame added the bug Something isn't working label Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant