{"record":{"id":"814b1a5dc4765bcc","repo":"phacility/phabricator","slug":"refusing-to-assess-image-dimensions-of-chunked-fil","errorCode":null,"errorMessage":"Refusing to assess image dimensions of chunked file.","messagePattern":"Refusing to assess image dimensions of chunked file\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/files/storage/PhabricatorFile.php","lineNumber":1112,"sourceCode":"  }\n\n  public function updateDimensions($save = true) {\n    if (!$this->isViewableImage()) {\n      throw new Exception(pht('This file is not a viewable image.'));\n    }\n\n    if (!function_exists('imagecreatefromstring')) {\n      throw new Exception(pht('Cannot retrieve image information.'));\n    }\n\n    if ($this->getIsChunk()) {\n      throw new Exception(\n        pht('Refusing to assess image dimensions of file chunk.'));\n    }\n\n    $engine = $this->instantiateStorageEngine();\n    if ($engine->isChunkEngine()) {\n      throw new Exception(\n        pht('Refusing to assess image dimensions of chunked file.'));\n    }\n\n    $data = $this->loadFileData();\n\n    $img = @imagecreatefromstring($data);\n    if ($img === false) {\n      throw new Exception(pht('Error when decoding image.'));\n    }\n\n    $this->metadata[self::METADATA_IMAGE_WIDTH] = imagesx($img);\n    $this->metadata[self::METADATA_IMAGE_HEIGHT] = imagesy($img);\n\n    if ($save) {\n      $this->save();\n    }\n\n    return $this;","sourceCodeStart":1094,"sourceCodeEnd":1130,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/storage/PhabricatorFile.php#L1094-L1130","documentation":"Error \"Refusing to assess image dimensions of chunked file.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/files/storage/PhabricatorFile.php:1112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}