fix billing process

This commit is contained in:
Dennis Eichhorn 2023-04-08 04:36:26 +02:00
parent a4382bdb12
commit c360c0d726
3 changed files with 18 additions and 8 deletions

View File

@ -8,9 +8,11 @@ assignees: ''
--- ---
# Bug Description # Bug Description
A clear and concise description of what the bug is. A clear and concise description of what the bug is.
# How to Reproduce # How to Reproduce
Steps to reproduce the behavior: Steps to reproduce the behavior:
1. Go to '...' 1. Go to '...'
@ -19,16 +21,20 @@ Steps to reproduce the behavior:
4. See error 4. See error
# Expected Behavior # Expected Behavior
A clear and concise description of what you expected to happen. A clear and concise description of what you expected to happen.
# Screenshots # Screenshots
If applicable, add screenshots to help explain your problem. If applicable, add screenshots to help explain your problem.
# System Information # System Information
- System: [e.g. PC or iPhone11, ...]
- OS: [e.g. iOS] - System: [e.g. PC or iPhone11, ...]
- Browser [e.g. chrome, safari] - OS: [e.g. iOS]
- KarakaVersion [e.g. 22] - Browser [e.g. chrome, safari]
- KarakaVersion [e.g. 22]
# Additional Information # Additional Information
Add any other context about the problem here. Add any other context about the problem here.

View File

@ -23,7 +23,6 @@ use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract; use phpOMS\Message\ResponseAbstract;
use phpOMS\Model\Message\FormValidation; use phpOMS\Model\Message\FormValidation;
/** /**
* Media class. * Media class.
* *
@ -75,8 +74,8 @@ final class ApiController extends Controller
private function validateEmailCreate(RequestAbstract $request) : array private function validateEmailCreate(RequestAbstract $request) : array
{ {
$val = []; $val = [];
if (($val['subject'] = empty($request->getData('subject'))) if (($val['subject'] = !$request->hasData('subject'))
|| ($val['body'] = empty($request->getData('body'))) || ($val['body'] = !$request->hasData('body'))
) { ) {
return $val; return $val;
} }

View File

@ -44,9 +44,14 @@ final class Email extends MailEmail implements \JsonSerializable
private array $media = []; private array $media = [];
/**
* Constructor.
*
* @since 1.0.0
*/
public function __construct() public function __construct()
{ {
$this->account = new NullAccount(); $this->account = new NullAccount();
$this->createdAt = new \DateTimeImmutable('now'); $this->createdAt = new \DateTimeImmutable('now');
} }