Class name must be a valid object or a string

Permalink
I am developing a custom block for version 5.8. I followed all the steps in the C5 development manual, but anytime I go to install the block, it gives me a "Class name must be a valid object or string" error. What am I doing wrong?

Here's my controller.php code:

<?php
namespace Application\Block\product_information;
use Concrete\Core\Block\BlockController;
class Controller extends BlockController {
protected $btTable = 'btProductInformation';
protected $btInterfaceWidth = "590";
protected $btInterfaceHeight = "450";
protected $btCacheBlockRecord = true;
protected $btCacheBlockOutput = true;
protected $btCacheBlockOutputOnPost = true;
protected $btCacheBlockOutputForRegisteredUsers = true;
protected $btCacheBlockOutputLifetime = CACHE_LIFETIME;
public function getBlockTypeDescription() {
  return t("Embeds Product Information in your web page.");
}

 
ramonleenders replied on at Permalink Best Answer Reply
ramonleenders
Change this line:

namespace Application\Block\product_information;

Into this line:

namespace Application\Block\ProductInformation;
kopoku27 replied on at Permalink Reply
Thank You!
Shubham2961995 replied on at Permalink Reply 2 Attachments
Hi,

I am going through same problem but this solution is not working for me. Please help me. Thanks In advance
mnakalay replied on at Permalink Reply
mnakalay
try to put this line
defined('C5_EXECUTE') or die("Access Denied.");

after all the use statements and before the class name.
Gondwana replied on at Permalink Reply
Gondwana
What is the filename and directory name?