using a package in composer write
Permalink
Hi all. i have a error :O please can anyone help?
Fatal error: Call to a member function canWrite() on a non-object in C:\xampp\htdocs\sites\gibson\packages\gal_side_thumbs\blocks\gal_side_thumbs\view.php on line 22
basically i need to stop my package from working when the user is logged in because the jquery used in the package conflicts with the concrete5 toolbar.
so i have wrapped my packages view.php in an if statement like this:
global $cp; if ($cp->canWrite()) {
// output
}
this works! but when i use this package in composer it gives the error when the user updates the file set that the package is using.
Fatal error: Call to a member function canWrite() on a non-object in C:\xampp\htdocs\sites\gibson\packages\gal_side_thumbs\blocks\gal_side_thumbs\view.php on line 22
basically i need to stop my package from working when the user is logged in because the jquery used in the package conflicts with the concrete5 toolbar.
so i have wrapped my packages view.php in an if statement like this:
global $cp; if ($cp->canWrite()) {
// output
}
this works! but when i use this package in composer it gives the error when the user updates the file set that the package is using.
instead of using global, try:
Does it work?
Greets