{"record":{"id":"beade09b78b6e504","repo":"yiisoft/yii2","slug":"in-from-is-not-supported","errorCode":null,"errorMessage":"{} in $from is not supported.","messagePattern":"(.+?) in \\$from is not supported\\.","errorType":"exception","errorClass":"yii\\base\\InvalidConfigException","httpStatus":null,"severity":"error","filePath":"framework/db/Query.php","lineNumber":530,"sourceCode":"     * Both aliases and names are enclosed into {{ and }}.\n     * @return string[] table names indexed by aliases\n     * @throws \\yii\\base\\InvalidConfigException\n     * @since 2.0.12\n     */\n    public function getTablesUsedInFrom()\n    {\n        if (empty($this->from)) {\n            return [];\n        }\n\n        if (is_array($this->from)) {\n            $tableNames = $this->from;\n        } elseif (is_string($this->from)) {\n            $tableNames = preg_split('/\\s*,\\s*/', trim($this->from), -1, PREG_SPLIT_NO_EMPTY);\n        } elseif ($this->from instanceof Expression) {\n            $tableNames = [$this->from];\n        } else {\n            throw new InvalidConfigException(gettype($this->from) . ' in $from is not supported.');\n        }\n\n        return $this->cleanUpTableNames($tableNames);\n    }\n\n    /**\n     * Clean up table names and aliases\n     * Both aliases and names are enclosed into {{ and }}.\n     * @param array $tableNames non-empty array\n     * @return string[] table names indexed by aliases\n     * @since 2.0.14\n     */\n    protected function cleanUpTableNames($tableNames)\n    {\n        $cleanedUpTableNames = [];\n        foreach ($tableNames as $alias => $tableName) {\n            if (is_string($tableName) && !is_string($alias)) {\n                $pattern = <<<PATTERN","sourceCodeStart":512,"sourceCodeEnd":548,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/db/Query.php#L512-L548","documentation":"Error \"{} in $from is not supported.\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/db/Query.php:530 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":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}