Skip to content

Commit

Permalink
preg fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Oct 12, 2023
1 parent e0c1cdf commit 949ad41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AbraFlexi/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public function loadFromAbraFlexi($id = null) {
*/
public function updateApiURL() {
$code = $this->getDataValue('kod');
if(empty($code) && is_string($this->init) && preg_match('^code:',$this->init) ){
if(empty($code) && is_string($this->init) && preg_match('/^code:/',$this->init) ){
$this->setMyKey(\AbraFlexi\RO::uncode($this->init));
} else {
$this->unsetDataValue('kod');
parent::updateApiURL();
}
if(strlen($code)){
if(empty($code) === false){
$this->setDataValue('kod', $code);
}
}
Expand Down

0 comments on commit 949ad41

Please sign in to comment.