Title: Errors and a quick question
Last modified: August 21, 2016

---

# Errors and a quick question

 *  Resolved [Dan Griffiths](https://wordpress.org/support/users/ghost1227/)
 * (@ghost1227)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-and-a-quick-question/)
 * Revisr is throwing the following error twice on load:
 * Undefined offset: 0 in wp-content\plugins\revisr\admin\includes\functions.php
   on line 38
 * Also, do you have a public repo anywhere that users can contribute to?
 * [https://wordpress.org/plugins/revisr/](https://wordpress.org/plugins/revisr/)

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

 *  Thread Starter [Dan Griffiths](https://wordpress.org/support/users/ghost1227/)
 * (@ghost1227)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-and-a-quick-question/#post-5043703)
 * Also, throws the following on branch creation:
 * Warning: call_user_func_array() expects parameter 1 to be a valid callback, class‘
   Revisr’ does not have a method ‘create_branch’ in wp-includes\plugin.php on line
   470
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-and-a-quick-question/#post-5043714)
 * Can you please post more details on your environment?
 *  Thread Starter [Dan Griffiths](https://wordpress.org/support/users/ghost1227/)
 * (@ghost1227)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-and-a-quick-question/#post-5043777)
 * Happens both on a local Windows machine running Desktop Server and on an actual
   server running CentOS 6 with a standard LAMP stack. The issues, however, are 
   not environment related. The first issue is in the current_branch() function 
   which is called on init during the constructor. The content of current_branch()
   ran a single command:
 * $output = git(“rev-parse –abbrev-ref HEAD”);
 * before returning the 0 index of $output. However, $output isn’t definable is 
   git hasn’t yet been configured. As such, it throws the undefined offset error.
   The solution is to tweak the return as such:
 * return ( isset( $output[0] ) ? $output[0] : false );
 * This only returns the 0 index if its present, otherwise simply returns false.
 * Haven’t tracked down the second issue, but I’ll let you know when I do.
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-and-a-quick-question/#post-5043787)
 * Hello,
 * We pushed out an update last night that should address the undefined offset if
   got hasn’t been configured. Regarding the second issue, please let me know if
   you’re still seeing this issue, and if you do, the version of WordPress and revisr
   you’re running. Does it occur on both environments?
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/errors-and-a-quick-question/#post-5043874)
 * Hello,
 * I haven’t heard back from you, but we just pushed out another update that should
   address the other issue you mentioned above. Please check and let me know if 
   you run into any further issues.
 * Thank you.

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

The topic ‘Errors and a quick question’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/revisr_ecf0f1.svg)
 * [Revisr](https://wordpress.org/plugins/revisr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/revisr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/revisr/)
 * [Active Topics](https://wordpress.org/support/plugin/revisr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/revisr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/revisr/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/errors-and-a-quick-question/#post-5043874)
 * Status: resolved