Reply to comment

  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/embed.php on line 32.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryEmbed::getEmbedPathByHttpRequest() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/embed.php on line 36.
  • strict warning: Non-static method GalleryUtilities::getRequestVariablesNoPrefix() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 1092.
  • strict warning: Non-static method GalleryUtilities::_getRequestVariable() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 289.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 875.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 879.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 293.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 708.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 714.
  • strict warning: Non-static method GalleryEmbed::init() should not be called statically in /var/www/kibergus.su/htdocs/sites/all/modules/gallery/gallery_base.inc on line 134.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 94.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 46.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 47.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 48.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 49.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryModule.class on line 21.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 55.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryPlatform/UnixPlatform.class on line 21.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 107.
  • strict warning: Non-static method GalleryUtilities::getRequestVariables() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 150.
  • strict warning: Non-static method GalleryUtilities::_getRequestVariable() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 242.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 875.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 879.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 246.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 708.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUtilities.class on line 714.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 152.
  • strict warning: Non-static method GalleryTranslator::getSupportedLanguageCode() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 154.
  • strict warning: Non-static method GalleryTranslator::getLanguageData() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryTranslator.class on line 414.
  • strict warning: Non-static method GalleryUtilities::strToUpper() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryTranslator.class on line 418.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 103.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryEmbed::isCompatibleWithEmbedApi() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 107.
  • strict warning: Non-static method GalleryEmbed::getApiVersion() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 61.
  • strict warning: Non-static method GalleryUtilities::isCompatibleWithApi() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 61.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 128.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryCoreApi::getAllFactoryImplementationIds() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 179.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 187.
  • strict warning: Non-static method GalleryFactoryHelper_simple::getAllImplementationIds() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 188.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getFactoryData() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 213.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getSingleton() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 63.
  • strict warning: Non-static method GalleryCoreApi::newFactoryInstanceById() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 186.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 174.
  • strict warning: Non-static method GalleryFactoryHelper_simple::newInstanceById() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 175.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getFactoryData() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 191.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getSingleton() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 63.
  • strict warning: Non-static method GalleryFactoryHelper_simple::newInstance() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 201.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getFactoryData() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 141.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getSingleton() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 63.
  • strict warning: Non-static method GalleryCoreApi::getAnonymousUserId() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 203.
  • strict warning: Non-static method GalleryCoreApi::getPluginParameter() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 3078.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 300.
  • strict warning: Non-static method GalleryPluginHelper_simple::getParameter() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 302.
  • strict warning: Non-static method GalleryPluginHelper_simple::_fetchAllParameters() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 222.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 281.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::get() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 282.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 186.
  • strict warning: Non-static method GalleryCoreApi::loadEntitiesById() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/init.inc on line 208.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 2360.
  • strict warning: Non-static method GalleryEntityHelper_simple::loadEntitiesById() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 2361.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 53.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::getFromDisk() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 56.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 273.
  • strict warning: Non-static method GalleryDataCache::getCachePath() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 280.
  • strict warning: Non-static method GalleryDataCache::getCacheTuple() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 405.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 287.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUser.class on line 21.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEntity.class on line 21.
  • strict warning: Declaration of GalleryUser::create() should be compatible with GalleryEntity::create() in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUser.class on line 42.
  • strict warning: Declaration of GalleryUser::save() should be compatible with GalleryEntity::save($postEvent = true, $setAclId = NULL) in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryUser.class on line 42.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 95.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryUtilities::isA() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 118.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 133.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryEmbed::done() should not be called statically in /var/www/kibergus.su/htdocs/sites/all/modules/gallery/gallery_block.inc on line 36.
  • strict warning: Non-static method GalleryEmbed::getBlock() should not be called statically in /var/www/kibergus.su/htdocs/sites/all/modules/gallery/gallery_block.inc on line 194.
  • strict warning: Non-static method GalleryCoreApi::fetchPluginStatus() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 994.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 368.
  • strict warning: Non-static method GalleryPluginHelper_simple::fetchPluginStatus() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 369.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 347.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::getFromDisk() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 352.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 273.
  • strict warning: Non-static method GalleryDataCache::getCachePath() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 280.
  • strict warning: Non-static method GalleryDataCache::getCacheTuple() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 438.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 444.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryCoreApi::getCodeBasePath() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 1000.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 1006.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 1012.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryTheme.class on line 21.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 1020.
  • strict warning: Non-static method GalleryView::setStandardTemplateVariables() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEmbed.class on line 1021.
  • strict warning: Non-static method GalleryCoreApi::isAnonymousUser() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryView.class on line 660.
  • strict warning: Non-static method GalleryCoreApi::getAnonymousUserId() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 3098.
  • strict warning: Non-static method GalleryCoreApi::getPluginParameter() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 3078.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 300.
  • strict warning: Non-static method GalleryPluginHelper_simple::getParameter() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 302.
  • strict warning: Non-static method GalleryPluginHelper_simple::_fetchAllParameters() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 222.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 281.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::get() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 282.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 186.
  • strict warning: Non-static method GalleryCoreApi::isUserInSiteAdminGroup() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryView.class on line 665.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 1775.
  • strict warning: Non-static method GalleryUserGroupHelper_simple::isUserInSiteAdminGroup() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 1776.
  • strict warning: Non-static method GalleryCoreApi::getPluginParameter() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryUserGroupHelper_simple.class on line 41.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 300.
  • strict warning: Non-static method GalleryPluginHelper_simple::getParameter() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 302.
  • strict warning: Non-static method GalleryPluginHelper_simple::_fetchAllParameters() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 222.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 281.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::get() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 282.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 186.
  • strict warning: Non-static method GalleryUserGroupHelper_simple::isUserInGroup() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryUserGroupHelper_simple.class on line 46.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryUserGroupHelper_simple.class on line 62.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryCoreApi::getMapEntry() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryUserGroupHelper_simple.class on line 68.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryUserGroupHelper_simple.class on line 74.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Declaration of GalleryChildEntity::create() should be compatible with GalleryEntity::create() in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryChildEntity.class on line 0.
  • strict warning: Declaration of GalleryChildEntity::createLink() should be compatible with GalleryEntity::createLink($entity) in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryChildEntity.class on line 0.
  • strict warning: Declaration of GalleryFileSystemEntity::create() should be compatible with GalleryChildEntity::create($parentId) in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryFileSystemEntity.class on line 44.
  • strict warning: Declaration of GalleryItem::save() should be compatible with GalleryEntity::save($postEvent = true, $setAclId = NULL) in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryItem.class on line 44.
  • strict warning: Declaration of GalleryAlbumItem::create() should be compatible with GalleryItem::create($parentId, $path, $canContainChildren = false) in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryAlbumItem.class on line 41.
  • strict warning: Only variables should be passed by reference in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEvent.class on line 54.
  • strict warning: Declaration of mapModule::getItemLinks() should be compatible with GalleryModule::getItemLinks($items, $wantsDetailedLinks, $permissions, $userId) in /var/www/kibergus.su/htdocs/gallery2/modules/map/module.inc on line 0.
  • strict warning: Declaration of mapModule::getItemSummaries() should be compatible with GalleryModule::getItemSummaries($items, $permissions, &$template) in /var/www/kibergus.su/htdocs/gallery2/modules/map/module.inc on line 0.
  • strict warning: Declaration of GalleryDataItem::create() should be compatible with GalleryItem::create($parentId, $path, $canContainChildren = false) in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataItem.class on line 417.
  • strict warning: Declaration of GalleryDerivativeImage::create() should be compatible with GalleryDerivative::create($parentId) in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDerivativeImage.class on line 40.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/lib/smarty_plugins/modifier.markup.php on line 46.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryCoreApi::getPluginParameter() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/lib/smarty_plugins/modifier.markup.php on line 48.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 300.
  • strict warning: Non-static method GalleryPluginHelper_simple::getParameter() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryCoreApi.class on line 302.
  • strict warning: Non-static method GalleryPluginHelper_simple::_fetchAllParameters() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 222.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 281.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::get() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 282.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 186.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/lib/smarty_plugins/modifier.markup.php on line 53.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryDataCache::get() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/lib/smarty_plugins/modifier.markup.php on line 56.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 186.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/lib/smarty_plugins/modifier.markup.php on line 46.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::get() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/lib/smarty_plugins/modifier.markup.php on line 56.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryDataCache.class on line 186.
  • strict warning: Only variables should be passed by reference in /var/www/kibergus.su/htdocs/gallery2/modules/core/classes/GalleryEvent.class on line 54.
  • strict warning: Non-static method GalleryEmbed::parseHead() should not be called statically in /var/www/kibergus.su/htdocs/sites/all/modules/gallery/gallery_base.inc on line 495.
  • strict warning: Non-static method GalleryEmbed::done() should not be called statically in /var/www/kibergus.su/htdocs/sites/all/modules/gallery/gallery_block.inc on line 36.

C++ support on avr with gcc

Avrgcc compiler supports C++, but it lacks standard library and C++ ABI realization. ABI is a set of service functions, calls to which are inserted by a compiler. As a result people tend to implement missing parts in a fast but improper way. For example there is plenty of recipes how to shoot your foot by defining empty realization for __cxa_pure_virtual(void) {} or install rakes with __cxa_guard_acquire, __cxa_guard_release and __cxa_guard_abort stubs. This article is an attempt to understand what is needed for happiness, where it can be taken or how it can be written.
I know, that some developers think, that C++ is not a good choice for microcontrollers. I ask these people to read at least the last section of the article before writing comments.

Arduino quiks

Arduino has limited C++ support. As far as I understand, arduino IDE developers are not interested in it, so they just include one of the kludges available on the internet. Occasionally it appeared to be post on avrfreaks without corrections from comments. So first of all you would have to remove this kludge by deleting
  • hardware/arduino/cores/arduino/new.h
  • hardware/arduino/cores/arduino/new.cpp
Or you can use patched version.

Pure virtual and deleted methods

Virtual methods are usually implemented by vtables. Even if you define your method virtual compiler would reserve space in vtable for it because child classes would put pointer to their realization there. This space must be filled and, as far as there is no realization for it, compiler fills it with address of a stub function called __cxa_pure_virtual. If you manage to call pure virtual method then control would be passed to the stub which would terminate program. It is much better, than executing random bytes in memory. Notice, that you get this protection nearly free: __cxa_pure_virtual realization consists of one function call and uses 6 bytes of flash.
There is a reasonable question: how can I call pure virtual method if I can't create object of abstract class? You can't create it, but you can do bad things by writing strange code:
class B {
public:
    B() {
        // Object of class C is not created yet, so vtable points to B's vtable
        // But virtual functions don't work in constructors, so instead of
        // direct call we call non virtual method
        non_virtual();
    }
 
    void non_virtual() {
        // This function does not know that it is called from constructor
        // so it makes virtual call and, as far as B's vtable is active...
        virt();
        // pure virtual method called
        // terminate called without an active exception
    }
 
    virtual void virt() = 0;
};
 
class C : public B{
public:
    virtual void virt() {}
};
 
int main(int argc, char** argv) {
    C c;
    return 0;
}
If you want to avoid such errors don't avoid calling method of uninitialized objects. In other words: don't do complex things in constructors. If you want compiler to build your program add following realizations:
void __cxa_pure_virtual(void) {
    // We might want to write some diagnostics to uart in this case
    std::terminate();
}
 
void __cxa_deleted_virtual(void) {
    // We might want to write some diagnostics to uart in this case
    std::terminate();
}
You would also need std::terminate. You can save 2 bytes of RAM and 14 bytes of flash by directly calling abort(), but I'll explain later why std::terminate is much more preferable.

Static variables

You can define variable in a function as static. This would make it like global, but it would be visible only in the function.
int counter(int start) {
    static int cnt = start;
    return ++cnt;
}
This code won't compile by C compiler because static variable must be initialized with a constant. This allows to put needed value in .data section directly. In C++ such code is allowed, but previous standards didn't specify what would happen if multiple threads try to initialize the variable. Many compilers added locking to ensure thread safety and in C++11 it became a requirement.
If you initialize a static variable at runtime gcc would transform initialization to following code: gcc/cp/decl.c
static <type> guard;
if (!guard.first_byte) {
    if (__cxa_guard_acquire (&guard)) {
        bool flag = false;
        try {
            // Do initialization.
            flag = true; __cxa_guard_release (&guard);
            // Register variable for destruction at end of program.
        } catch {
            if (!flag) __cxa_guard_abort (&guard);
        }
    }
}
where guard - is an integral type big enough to hold a flag and a mutex. Review of gcc code has shown that only ARM architecture has any optimizations here:
gcc/config/arm/arm.c
/* The generic C++ ABI says 64-bit (long long).  The EABI says 32-bit.  */
static tree
arm_cxx_guard_type (void)
{
  return TARGET_AAPCS_BASED ? integer_type_node : long_long_integer_type_node;
}
In other cases guard is long long. On avr it is 64 or 32 bits depending on -mint8 option. guard.first_byte, where flag is located, is defined as byte with least address: *(reinterpret_cast(g)). ARM platform is an exception, only one bit of the first byte is used for a flag.

What's the right way?

If you don't need thread safe initialization of static variables disable it with -fno-threadsafe-statics and compiler instead of complicated locking would insert simple flag check. You don't need __cxa_guard_* definitions or realizations in this case. But if you provide these functions (as arduino does), then they must ensure correct behavior even on simultaneous initialization from usual code and from interrupt. In other words __cxa_guard_acquire must block interrupts and __cxa_guard_release and __cxa_guard_abort must revert to previous state. In case of RTOS I would probably agree to sacrifice interrupt corrections but ensuring thread safety.
Correct realization should be like this:
namespace {
// guard is an integer type big enough to hold flag and a mutex. 
// By default gcc uses long long int and avr ABI does not change it
// So we have 32 or 64 bits available. Actually, we need 16.
 
inline char& flag_part(__guard *g) {
    return *(reinterpret_cast<char*>(g));
}
 
inline uint8_t& sreg_part(__guard *g) {
    return *(reinterpret_cast<uint8_t*>(g) + sizeof(char));
}
}
 
int __cxa_guard_acquire(__guard *g) {
    uint8_t oldSREG = SREG;
    cli();
    // Initialization of static variable has to be done with blocked interrupts
    // because if this function is called from interrupt and sees that somebody
    // else is already doing initialization it MUST wait until initializations
    // is complete. That's impossible.
    // If you don't want this overhead compile with -fno-threadsafe-statics
    if (flag_part(g)) {
        SREG = oldSREG;
        return false;
    } else {
        sreg_part(g) = oldSREG;
        return true;
    }
}
 
void __cxa_guard_release (__guard *g) {
    flag_part(g) = 1;
    SREG = sreg_part(g);
}
 
void __cxa_guard_abort (__guard *g) {
    SREG = sreg_part(g);
}


How much it costs?

If you use don't use static variables or initialize them with constants you pay nothing. If you use -fno-threadsafe-statics, then you pay 8 bytes of RAM for the flag and 12 bytes of flash per variable. If you use thread safe initialization you pay extra 38 bytes of flash per variable and 44 bytes of flash per program. Beside that you have interrupts disabled one time for every initialization. But you don't do complex tasks in constructors, right?
You have a choice but in any case, if you supply __cxa_guard_*, they must ensure thread safety, not a stub suggested everywhere. And the best solution is not to use static variables.

Where can I take it?

abi.h and abi.cpp

operator new and operator delete

When speaking about new and delete there is always a person who says: "Microcontrollers have very limited amount of RAM, using dynamic memory is worst thing you can do.". These people don't know that new and delete are used not only for dynamic memory management. There is placement new which places object in a buffer specified by a programmer. You can't write one of the most favorite containers in embedded world, circular buffer, without it. On the other hand, if you are sure, that dynamic memory is not needed, why there are malloc and free in avrlibc? If I can do without them in C I would do without new and delete in C++. If I need malloc in C I would need new in C++.

new and delete overloads First of all there is operator new which allocates single objects and operator new[] which allocates arrays. Difference is that new[] has to store array size to be able to call destructor of each element later. So it is important to use matching operator delete or operator delete[] to free resources.
Secondly, each of these operators, like any usual function, can be overloaded. Standard defines following three variants:
  1. void* operator new(std::size_t numBytes) throw(std::bad_alloc); allocates block of numBytes size. On failure throws std::bad_alloc exception
  2. void* operator new(std::size_t numBytes, const std::nothrow_t& ) throw(); allocates block of numBytes size. On failure returns nullptr
  3. inline void* operator new(std::size_t, void* ptr) throw() {return ptr; } placement new, places object where it is told to. Mostly used for containers implementation
Arduino library, for unknown reasons, provides only void* operator new(std::size_t numBytes) throw(std::bad_alloc), which occasionally returns 0 on failure. This leads to undefined behaviour because nobody checks returned value.
Operator delete is a little bit more tricky. There are void* operator delete(std::size_t numBytes) and void* operator delete[](std::size_t numBytes). You can overload them for other arguments, but you can't call these overloads because C++ does not have syntax for that. There is only one case when these overloads can be called. Imagine that during object creation in dynamic memory operator new has successfully allocated memory, but constructor of the object has thrown an exception. Your code hasn't received the pointer yet, so it can't free memory. So compiler has to call delete itself. But what would happen if memory has been "allocated" with placement new? You can't free it with regular delete. So in this case compiler calls overloaded version of delete with the same arguments as new has been called. That's why standard library provides three versions of operator delete and three versions of operator delete[].

bad_alloc handling

As noted above, the most popular version of new must throw exception in case of failure. But gcc does not support exceptions on avr: you can't throw or catch them. But if you cant' catch them, then there is no try sections in the program and, if occasionally exception would be thrown std::terminate would be called. What is more interesting, in this particular case standard allows not to unwind the stack (see 15.5.1). So operator new can just call std::terminate directly without violating the standard.
You should not be scared that library would terminate your firmware! How often can you recover from bad_alloc? Usually nothing can be done, you can't work further. So thank God that your firmware has been terminated immediately and in the most safe way. But if you can deal with the error you still have nothrow version of operator new.Threat new like safe version of malloc which behaves correctly if you don't check returned value.

Where can I take it

uClibc++ has complete realization of new and delete. But it calls abort() instead of std::terminate. So I've made patched version. I've also added initializer lists, std::move and std::forward.

std::terminate vs abort()

According to avr-libc documentation, abort() blocks all interrupts and falls into infinite loop. This is not what I want for two reasons. First of all, device is left in dangerous state. Imagine that the device controls a heater element and hangs when it is on. In case of error I want to switch to safe state by setting all pins to low state. Secondly, I already know that things are terribly wrong and I want to reset immediately without waiting for watchdog.
If firmware exits by calling std::terminate, I can set custom handler and perform needed actions. But I can't redefine abort: method supposed in UNIX does not work on avr. So I prefer spending 2 bytes of RAM and 14 bytes of ROM needed for std::terminate.

Exceptions

Exceptions is a part of C++ for which you have to pay much. Not only in code which actually uses exceptions but also in code, through which the exception may be thrown.Compiler has to register destructor of each automatic variable. Beside that exceptions usually need RTTI and additional buffer in RAM, where exceptions like std::bad_alloc may be allocated even if program has run out of RAM. Beside that exceptions is a part of C++ for which it is hard (but not impossible) to predict run time. As far as I understand, anybody who has knowledge needed to implement exceptions on avr looses his desire to do it because there is plenty of more useful things to do. So I don't expect exceptions to appear on avrgcc in near future.

STL

I've seen many people saying, that STL on microcontroller is an evil: it bloats code and by making complex things simple incites to use them. But nobody says that STL also contains such things as quick sort, which is much aster and compact than libc's qsort, or binary search, type safe versions of min and max. Do you really know sacral way of making classical algorithms more efficient? So why not to use tested algorithm which uses as much space as you would need for your own implementation. And of course you don't pay for parts of STL you don't use.

Where can I take it?

Use uClibc++. This library has one weird feature: std::map and std::set are based on vector instead of tree, so iterators are invalidated on insertions. Operations complexity is different too. Read documentation for explanations.

Why I need C++

This is topic for separate discussion which I would write one day. In short: if used wisely C++ allows to write programs as efficient as C programs are. But it also gives more readable sources and a safer code because of additional compiler checks. Beside that templates allow to write efficient realizations of generic algorithms, which is hard on C. And I'm also just used to C++.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].

More information about formatting options