From 226b50642af0895948fbaa623a9b7180399a63b6 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 13 May 2026 19:15:48 +0000
Subject: [PATCH] =Queue fixes
---
inc/meta/Meta.php | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/inc/meta/Meta.php b/inc/meta/Meta.php
index a32c545..fcf262a 100644
--- a/inc/meta/Meta.php
+++ b/inc/meta/Meta.php
@@ -17,9 +17,9 @@
*/
protected string $type;
/**
- * @var string the full slug, with BASE
+ * @var ?string the full slug, with BASE
*/
- protected string $slug;
+ protected ?string $slug;
protected string $contentType;
protected Item $item;
@@ -27,7 +27,7 @@
protected Validator $validator;
protected Sanitizer $sanitizer;
protected array $fields;
- protected WP_Post|WP_Term|WP_User|null $wpObject;
+ protected WP_Post|WP_Term|WP_User|false|null $wpObject;
protected int|string $ID;
protected MetaTypeManager $typeManager;
protected static array $instances = ['post' => [],'term' => [], 'user'=>[],'options'=>[]];
@@ -104,11 +104,8 @@
'post' => get_post($id),
'term' => get_term($id),
'user', 'integrations' => get_userdata($id),
- default => null
+ default => false
};
- if (!$this->wpObject){
- return;
- }
$this->slug = match($type) {
'post' => $this->wpObject->post_type,
@@ -119,7 +116,7 @@
- $registrar = Registrar::getInstance($this->slug);
+ $registrar = !is_null($this->slug) ? Registrar::getInstance($this->slug) : false;
$fields = $registrar ? $registrar->getFields() : [];
$meta = match($type) {
'post' => get_post_meta($id),
@@ -254,7 +251,6 @@
public function setAll(array $data):bool
{
foreach ($data as $name => $value) {
- error_log('Setting '.$name.' with value: '.print_r($value, true));
$this->set($name, $value, false);
}
return $this->save();
--
Gitblit v1.10.0