When i try to add image(s) via api getting this error. When i check what i have on $event->arguments(0) its filename of image file.
Fix: Warning: Attempt to read property "id" on string
|
$pageid = $event->arguments(0)->id; |
$arg = $event->arguments(0);
if (is_string($arg) && strpos($arg, '/') !== false) {
$pageid = basename(dirname($arg));
} else {
$pageid = $arg->id;
}
When i try to add image(s) via api getting this error. When i check what i have on
$event->arguments(0)its filename of image file.Fix: Warning: Attempt to read property "id" on string
CustomUploadNames/ProcessCustomUploadNames.module.php
Line 141 in 44c0d1b