DASPRiD/AssetLoader — Issue #1: check if asset is dir
Author: billyildirim
Created: 2012-02-13 16:07:02+00:00
State: open

Hi,
I have been have problems with this module.

I installed ZF2 Skeleton (https://github.com/zendframework/ZendSkeletonApplication) which comes with Application module and installed ZF2SkeletonModule (https://github.com/zendframework/ZendSkeletonModule) on the top of this.

Also created public/images function under ZendSkeletonModule folder and placed an image there. In my index.phtml file in ZendSkeletonModule, I call the image file as () which worked fine.

But when I hit the application module (which is the default module) I was getting an empty page. After digging a little bit, I changed the checkRequestUriForAsset method to check if the asset is directory or not before sending it.

...
foreach ($this->assetPaths as $assetPath) {
if (!is_dir($assetPath . $path)) {
if (file_exists($assetPath . $path)) {
$this->sendFile($assetPath . $path);
}
}
}

And know both Application and Skeleton modules works just as they should be.

I don't know if this was a bug or I was doing something wrong but just wanted to let you know.