{"record":{"id":"1a7217556e4cae16","repo":"phalcon/cphalcon","slug":"invalid-value-for-the-accesslist","errorCode":null,"errorMessage":"Invalid value for the accessList","messagePattern":"Invalid value for the accessList","errorType":"exception","errorClass":"Phalcon\\Acl\\Exceptions\\InvalidAccessList","httpStatus":null,"severity":"error","filePath":"phalcon/Acl/Adapter/Memory.zep","lineNumber":255,"sourceCode":"            let this->components[componentName]      = componentObject;\n            let this->componentsNames[componentName] = true;\n        }\n\n        return this->addComponentAccess(componentName, accessList);\n    }\n\n    /**\n     * Adds access to components\n     */\n    public function addComponentAccess(string componentName, var accessList) -> bool\n    {\n        var accessKey, accessName;\n        bool exists;\n\n        this->checkExists(this->componentsNames, componentName, \"Component\");\n\n        if unlikely (typeof accessList !== \"array\" && typeof accessList !== \"string\") {\n            throw new InvalidAccessList();\n        }\n\n        let exists = true;\n\n        if typeof accessList === \"array\" {\n            for accessName in accessList {\n                let accessKey = this->buildAccessKey(componentName, accessName);\n\n                if !isset this->accessList[accessKey] {\n                    let this->accessList[accessKey] = exists;\n                }\n            }\n        } else {\n            let accessKey = this->buildAccessKey(componentName, accessList);\n\n            if !isset this->accessList[accessKey] {\n                let this->accessList[accessKey] = exists;\n            }","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Acl/Adapter/Memory.zep#L237-L273","documentation":"QueryBuilderCursor throws InvalidCursorColumn from the constructor when 'cursorColumn' is present but is not a non-empty string (typeof != 'string' or empty). The column name is embedded directly into the generated WHERE clause ('[' . cursorColumn . '] > :cursor:'), so an integer, array, or '' is unusable.","triggerScenarios":"'cursorColumn' => 0 (e.g. a falsy default from a config get), 'cursorColumn' => '', or passing a column index instead of a name.","commonSituations":"Config arrays sourced from env variables or YAML where the value arrives as an integer or null; copy-paste leaving a placeholder empty string; array config run through array_filter that dropped the key's value.","solutions":["Set 'cursorColumn' to the actual column name string, e.g. 'cursorColumn' => 'id'.","Cast/coerce config input before construction: ensure it is a non-empty string (e.g. validate with is_string($col) && $col !== '').","Check for accidental truthy-but-wrong values such as integers coming from JSON configs."],"exampleFix":"// before\n$paginator = new QueryBuilderCursor(\n    [\n        'limit'        => 20,\n        'builder'      => $builder,\n        'cursorColumn' => '', // or 0 from env casting\n    ]\n); // throws InvalidCursorColumn\n\n// after\n$column = (string) ($_ENV['CURSOR_COLUMN'] ?? 'id');\n$paginator = new QueryBuilderCursor(\n    [\n        'limit'        => 20,\n        'builder'      => $builder,\n        'cursorColumn' => $column !== '' ? $column : 'id',\n    ]\n);","handlingStrategy":"validation","validationCode":"$column = $config['cursorColumn'] ?? null;\nif (!is_string($column) || $column === '') {\n    throw new \\InvalidArgumentException(\n        'cursorColumn must be a non-empty column-name string'\n    );\n}\n$config['cursorColumn'] = $column;","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cast env/JSON-sourced config values to string and reject empties before construction.","Validate the whole paginator config array in one pass rather than fixing constructor errors one by one."],"tags":["paginator","cursor","validation","config"],"backgroundTag":"invalid-parameter-value","analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}