public
Last active

  • Download Gist
class-core.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php
function upgrade_3_5_2b2() { //line 625
// fixing the effects of a previous bug affecting non-MyISAM users
if ( is_null( yarpp_get_option('weight') ) || //<-- this is one point where it errors out
!is_array( yarpp_get_option('weight') ) ) {
$weight = $this->default_options['weight'];
// if we're still not using MyISAM
if ( !yarpp_get_option('myisam_override') &&
$this->myisam_check() !== true ) {
unset( $weight['title'] );
unset( $weight['body'] );
}
yarpp_set_option(array('weight' => $weight));
}
}
fix.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
diff --git a/class-core.php b/class-core_new.php
index d71ea77..39d6e32 100755
--- a/class-core.php
+++ b/class-core.php
@@ -624,16 +624,16 @@ class YARPP {
function upgrade_3_5_2b2() {
// fixing the effects of a previous bug affecting non-MyISAM users
- if ( is_null( yarpp_get_option('weight') ) ||
- !is_array( yarpp_get_option('weight') ) ) {
+ if ( is_null( $this->get_option('weight') ) ||
+ !is_array( $this->get_option('weight') ) ) {
$weight = $this->default_options['weight'];
// if we're still not using MyISAM
- if ( !yarpp_get_option('myisam_override') &&
+ if ( !$this->get_option('myisam_override') &&
$this->diagnostic_myisam_posts() !== true ) {
unset( $weight['title'] );
unset( $weight['body'] );
}
- yarpp_set_option(array('weight' => $weight));
+ $this->set_option(array('weight' => $weight));
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.