Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
viames committed May 16, 2023
1 parent e9bd2fc commit 5e967f7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function __get(string $name) {

try {

if (array_key_exists($name, static::getBinds()) or in_array($name, ['keyProperties', 'db', 'loadedFromDb', 'typeList', 'cache', 'errors'])) {
if (array_key_exists($name, static::getBinds()) or in_array($name, ['keyProperties', 'db', 'loadedFromDb', 'typeList', 'cache', 'errors', 'updatedProperties', 'dynamicProperties'])) {

if (!property_exists($this, $name)) {
throw new \Exception('Property “'. $name .'” doesn’t exist for object '. get_called_class());
Expand Down
12 changes: 12 additions & 0 deletions src/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,18 @@ public function delete(string $remoteFile): bool {
return true;
}

/**
* Deletes the remote directory at the specified path.
*/
public function deleteDir(string $remoteDir): bool {

if ($this->exists($remoteDir)) {
$this->filesystem->deleteDir($remoteDir);
}

return true;
}

/**
* Add an error to object’s error list.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static function fatalErrorHandler() {
} else {

print '<div style="background-color:#f1f1f1;border:2px solid red;margin:10px 0;padding:12px 16px">' .
PRODUCT_NAME . ' fatal error: ' . $error['message'] . '</div>';
PRODUCT_NAME . ' fatal error: ' . htmlspecialchars($error['message']) . '</div>';

}

Expand Down

0 comments on commit 5e967f7

Please sign in to comment.