Title: darookee's Replies | WordPress.org

---

# darookee

  [  ](https://wordpress.org/support/users/darookee/)

 *   [Profile](https://wordpress.org/support/users/darookee/)
 *   [Topics Started](https://wordpress.org/support/users/darookee/topics/)
 *   [Replies Created](https://wordpress.org/support/users/darookee/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/darookee/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/darookee/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/darookee/engagements/)
 *   [Favorites](https://wordpress.org/support/users/darookee/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Patch for Revolution Slider] Breaks the Media Library](https://wordpress.org/support/topic/breaks-the-media-library/)
 *  [darookee](https://wordpress.org/support/users/darookee/)
 * (@darookee)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/breaks-the-media-library/#post-5617172)
 * We still have problems with the media gallery but I found a workaround.
 * In wp-admin/admin-ajax.php is a check for ‘$_REQUEST[‘action’]’, if that is empty
   it will die. In your plugin on lines 51+52 $_POST[‘action’] and ‘client_action’
   are replaced with a cleaned up version. It seems that sometimes these are empty,
   resulting in an empty $_REQUEST[‘action’] letting admin-ajax.php die. I don’t
   know why $_POST is empty in the media gallery, as it is definitely sent via POST
   but I added a check to your plugin to see if $_POST[‘action’] is empty, and if
   it is, it will use $_REQUEST[‘action’] as source for the cleanup.
 * variables_order is GPCS, request_order GP
 * The code:
 *     ```
       if($_POST['action'])
                   $_POST['action'] = preg_replace('/[^a-zA-Z_\-0-9]/i', '', $_POST['action']);
               else
                   $_POST['action'] = preg_replace('/[^a-zA-Z_\-0-9]/i', '', $_REQUEST['action']);
               if($_POST['client_action'])
                   $_POST['client_action'] = preg_replace('/[^a-zA-Z_\-0-9]/i', '', $_POST['client_action']);
               else
                   $_POST['client_action'] = preg_replace('/[^a-zA-Z_\-0-9]/i', '', $_REQUEST['client_action']);
       ```
   

Viewing 1 replies (of 1 total)