fixed a few more warnings
This commit is contained in:
@@ -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 =>
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -73,7 +73,6 @@ class Router {
|
||||
$response = $endpoint->$method($data);
|
||||
wp_send_json($response);
|
||||
} catch(\Exception $e) {
|
||||
error_log($e->getMessage());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user