I’m using Client Config to store a File path for an option named img_placeholder
.
The database shows the expected value: skin/placeholder.jpg
Also as expected, calling $modx->getOption in my snippet prefixes the value returned with the media source basePath
: assets/media/
The value expected from $modx->getOption
is: assets/media/skin/placeholder.jpg
But the value I get has an extra forward slash: /assets/media/skin/placeholder.jpg
Can anyone suggest why this is?
The line in my snippet is below, specifically it’s the fallback to getOption
that is setting the value for $img_src
.
$img_src = $modx->getOption('src', $scriptProperties, $modx->getOption('img_placeholder'));
So it should just return assets/media/skin/placeholder.jpg
?
Thanks