fixed a few more warnings

This commit is contained in:
Jonathan Labreuille
2016-06-30 15:42:58 +02:00
parent e8887e2aa5
commit 9979261cb6
4 changed files with 9 additions and 12 deletions

View File

@@ -57,11 +57,6 @@ class Initializer {
\ORM::configure(Env::$db_source_name);
\ORM::configure('username', Env::$db_username);
\ORM::configure('password', Env::$db_password);
\ORM::configure('logging', WP_DEBUG);
\ORM::configure('logger', function($query, $time) {
// error_log("\n".$query."\n");
});
\ORM::configure('driver_options', array(
\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
\PDO::MYSQL_ATTR_INIT_COMMAND =>

View File

@@ -4,7 +4,7 @@ namespace MailPoet\Models;
if(!defined('ABSPATH')) exit;
class Form extends Model {
static $_table = MP_FORMS_TABLE;
public static $_table = MP_FORMS_TABLE;
function __construct() {
parent::__construct();

View File

@@ -153,11 +153,14 @@ class Forms {
if($block['type'] === 'segment') {
$has_segment_selection = true;
if(!empty($block['params']['values'])) {
$list_selection = array_map(function($segment) {
if(!empty($segment)) {
return (int)$segment['id'];
}
}, $block['params']['values']);
$list_selection = array_filter(
array_map(function($segment) {
return (isset($segment['id'])
? (int)$segment['id']
: null
);
}, $block['params']['values'])
);
}
break;
}

View File

@@ -73,7 +73,6 @@ class Router {
$response = $endpoint->$method($data);
wp_send_json($response);
} catch(\Exception $e) {
error_log($e->getMessage());
exit;
}
}