Skip to content

If your $_POST/$_FILES are empty and they shouldn't be, this library fixes them.

License

Notifications You must be signed in to change notification settings

pocketarc/fix-php-post-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is brunodebarros/fix-php-post-input

brunodebarros/fix-php-post-input fixes your $_POST and $_FILES if they're empty and they shouldn't be.

Why? Some incorrectly setup servers will not pass the right information required for PHP to automatically process input data (e.g. they'll say the HTTP method was GET because of an internal redirect).

For apps where you control the environment, this is easy to resolve. For self-hosted apps, that anyone can install anywhere, it's important to make sure that things continue to work without having to ask less tech-savvy users to mess with their server configurations.

In those cases, this library will automatically fix the $_POST and $_FILES arrays for you so that you can continue working without having to worry about it.

As a bonus, it will also process JSON (application/json) input into $_POST for you.

Requirements

  • PHP 5.4 or HHVM

Installation

brunodebarros/fix-php-post-input loads automatically with Composer.

composer require brunodebarros/fix-php-post-input

Usage

Once required, the package will automatically fix your $_POST/$_FILES for you. If they don't need fixing, this package will do nothing.

Suggestions, questions and complaints.

If you've got any suggestions, questions, or anything you don't like about this library, you should create an issue here. Feel free to fork this project, if you want to contribute to it.

About

If your $_POST/$_FILES are empty and they shouldn't be, this library fixes them.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages