Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G GProtector
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Gambio PublicGambio Public
  • GProtector
  • Merge requests
  • !4

refs #69677: use metaData only if its a valid object if a .cache file is empty 0 bytes so the shop can be accessed again

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Ahmed Hamouda requested to merge develop into master Apr 13, 2022
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

If a .cache file is empty 0 bytes, the shop cannot be accessed

Can be reproduced as follows:

  1. install store with G-Protector
  2. call the store
  3. open the file meta_data.cache on the FP server in the folder /GProtector/cache/ and remove the content
  4. upload the file again
  5. open the store again

Expected result: Store should still be callable and the file should be automatically filled with content again

Actual result: Store is no longer callable and an error message appears


Fatal error: Uncaught Error: Call to a member function modificationDateUnixTime() on boolean in /GProtector/classes/FilterCache.php:337 Stack trace: #0 /GProtector/classes/FilterCache.php(183): GProtector\FilterCache->getModificationDateUnixTime() 
#1 /GProtector/classes/FilterCache.php(84): GProtector\FilterCache->isCacheOlderThanRemoteFile() 
#2 /GProtector/classes/GProtector.inc.php(60): GProtector\FilterCache->renew() 
#3 /GProtector/start.inc.php(41): GProtector\GProtector->start() 
#4 /GXMainComponents/Application.inc.php(513): require('/var/www/tt/bet...') 
#5 /GXMainComponents/Application.inc.php(122): Gambio\GX\Application->runGProtector() 
#6 /includes/application_top.php(15): Gambio\GX\Application->run() 
#7 /index.php(27): include('/var/www/tt/bet...') 
#8 {main} thrown in /GProtector/classes/FilterCache.php on line 337
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop