Title: Fixed some issues
Last modified: August 21, 2016

---

# Fixed some issues

 *  Resolved [justnorris](https://wordpress.org/support/users/justnorris/)
 * (@justnorris)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/fixed-some-issues/)
 * Hi Paul,
    First of all – thanks for the amazing plugin. I’m using this in combination
   with WP-db migrate pro and – awhh – it’s just amazing. Having a site.com and 
   a dev.site.com be exactly 1:1 is just what I needed.
 * However, activating your plugin triggered some notices and warnings for me, which
   I’ve fixed now. For some reason the plugin didn’t work with them as well.
 * Anyhow – I’ve fixed the plugin with just some simple small tweaks.
    [https://www.sugarsync.com/pf/D1974934_71242712_689088](https://www.sugarsync.com/pf/D1974934_71242712_689088)
 * Issues I had were on Mac (MAMP): PHP 5.2.17
 * [http://wordpress.org/plugins/uploads-by-proxy/](http://wordpress.org/plugins/uploads-by-proxy/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/fixed-some-issues/#post-3973070)
 * Thanks [@justnorris](https://wordpress.org/support/users/justnorris/)!
 * I took a look through the patch and appreciate you’re taking the time to write
   it up and report it! Your attention to detail really helps out others a lot.
 * **Notice & patch**
    I think I saw the notice you were referring to, but want 
   to make sure the change I committed resolves the issue for you, so please check
   version 1.1.1 that was just deployed.
 * From what I could see in the error, the notice was being caused by PHP’s `parse_url`
   was not returning a `path` value for sites that were installed in the root directory.
   Rather than change where the plugin inits, I took the route of suppressing notices
   for that var, knowing it may or may not be in the array.
 * **__CLASS__ vs. Class_Name::**
    While I can understand some advantages of using`
   __CLASS__` to reference the current static class name (especially if the class
   is renamed), I prefer the `Class_Name::` syntax to help give context while reading
   through the method.
 * Since this seemed to be more a matter of style preference than directly related
   to the notice, I left that change out. Please let me know if I missed a significant
   functional difference here, or if I’m not addressing the actual error you were!
 * **Thanks & credit**
    Thanks for the excellent work! I have credited you and referenced
   this thread [in the changelog](http://wordpress.org/plugins/uploads-by-proxy/changelog/).
 * Paul
 *  Plugin Author [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/fixed-some-issues/#post-3973071)
 * PS: It looks like you’re on Github! You can find this and many of my other plugins
   at [github.com/brainstormmedia](https://github.com/brainstormmedia) and [github.com/stylesplugin](https://github.com/stylesplugin).
 *  Thread Starter [justnorris](https://wordpress.org/support/users/justnorris/)
 * (@justnorris)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/fixed-some-issues/#post-3973072)
 * That cleans up only half the problem.
 * When the admin_init filter is added, the referenced class doesn’t go through 
   in PHP 5.2.17
 *     ```
       Warning: call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'UPB_Helpers::requirements_check' was given in /Sites/Dev/wp-includes/plugin.php on line 406
       Call Stack
       #	Time	Memory	Function	Location
       1	0.0012	256368	{main}( )	../upload.php:0
       2	0.0022	388048	require_once( '/Sites/Dev/wp-admin/admin.php' )	../upload.php:10
       3	0.5306	40531568	do_action( )	../admin.php:109
       4	0.5359	40809304	call_user_func_array ( )	../plugin.php:406
       ```
   
 * PHP 5.3.14 and 5.4.4 Says:
 *     ```
       Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'UPB_Helpers' not found in /Sites/Dev/wp-includes/plugin.php on line 406
       Call Stack
       #	Time	Memory	Function	Location
       1	0.0012	801040	{main}( )	../upload.php:0
       2	0.0019	917176	require_once( '/Sites/Dev/wp-admin/admin.php' )	../upload.php:10
       3	0.4476	40468832	do_action( )	../admin.php:109
       4	0.4525	40742072	call_user_func_array ( )
       ```
   
 * I think that means that PHP Doesn’t really like the way the class is being called
   later on.
 *  Plugin Author [pdclark](https://wordpress.org/support/users/pdclark/)
 * (@pdclark)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/fixed-some-issues/#post-3973097)
 * Thanks. I see where that one was coming out now. Should be resolved in 1.1.2.
   The warning meant that the method was being called using static syntax, `UPB_Helpers::
   requirements_check`, but it wasn’t being declared as static.
 * [Here’s the diff](https://github.com/brainstormmedia/uploads-by-proxy/commit/146e2f90603e50f1baf1b07fa49d59bd9cdbcf59).
 *  Thread Starter [justnorris](https://wordpress.org/support/users/justnorris/)
 * (@justnorris)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/fixed-some-issues/#post-3973098)
 * Duh. I didn’t notice that. Well – I’m glad it’s resolved now 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Fixed some issues’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/uploads-by-proxy_fafafa.svg)
 * [Uploads by Proxy](https://wordpress.org/plugins/uploads-by-proxy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/uploads-by-proxy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/uploads-by-proxy/)
 * [Active Topics](https://wordpress.org/support/plugin/uploads-by-proxy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/uploads-by-proxy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/uploads-by-proxy/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [justnorris](https://wordpress.org/support/users/justnorris/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/fixed-some-issues/#post-3973098)
 * Status: resolved