PluginProbe
Lasso Lite – Affiliate Link Manager & Product Displays / 158
Lasso Lite – Affiliate Link Manager & Product Displays v158
158 157 155 156 154 153 152 151 150 149 148 trunk 0.9.9 104 105 106 107 108 109 110 111 112 113 114 115 All 57 releases
← All changes | models/class-model.php +8 -5 149158 View file →
@@ -582,12 +582,15 @@
582 582 * @return mixed Property value.
583 583 */
584 584 public function __get( $name ) {
585 585 $method = strtolower( $name );
586 - $property = $this->get_property_name( $method );
586 + $property = $method;
587 587
588 - if ( ! $property ) {
589 - $property = $method;
588 + if ( 0 === strpos( $method, 'get_' ) || 0 === strpos( $method, 'set_' ) ) {
589 + $derived = $this->get_property_name( $method );
590 + if ( $derived ) {
591 + $property = $derived;
592 + }
590 593 }
591 594
592 595 if ( ! in_array( $property, $this->columns, true ) ) {
593 596 return;
@@ -896,9 +899,9 @@
896 899 Update_DB::create_tables();
897 900 }
898 901
899 902 // ? Add force write log for lasso_debug, to see what happen when Lasso call query.
900 - trigger_error( $error, E_USER_NOTICE ); // phpcs:ignore
903 + trigger_error( '[lasso-lite-sql] ' . $error, E_USER_NOTICE ); // phpcs:ignore
901 904 }
902 905 }
903 906
904 907 /**
@@ -957,9 +960,9 @@
957 960 $reference_charset_table = $reference_charset_table ? $reference_charset_table : self::get_wp_table_name( 'posts' );
958 961 $reference_charset_status = $this->get_table_charset( $reference_charset_table, true );
959 962 $current_table_status = $this->get_table_charset( $table, false );
960 963
961 - if ( ! $reference_charset_status[1] !== $current_table_status[1] ) {
964 + if ( $reference_charset_status[1] !== $current_table_status[1] ) {
962 965 $result = $this->update_table_collation( $table, $reference_charset_status[0], $reference_charset_status[1] );
963 966 } else {
964 967 $result = true;
965 968 }