Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation Error: Operator '[]' is not applicable to an Undef Value #1151

Closed
rjemanuele opened this issue Dec 13, 2023 · 0 comments
Closed

Comments

@rjemanuele
Copy link

Describe the Bug

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /etc/puppetlabs/code/environments/ng_production/modules/apt/manifests/ppa.pp, line: 77, column: 8)

This occurs when a ppa is declared such as this inclusion of the PHP 8.2 PPA for Ubuntu
apt::ppa{ 'ppa:ondrej/php': }

On line 77 in ppa.pp $_proxy is indexed (operator []) without being check that it is defined.

Expected Behavior

The ppa defined should be installed without additional configuration options as shon in the examples.

Steps to Reproduce

Steps to reproduce the behavior:
Include a ppa declaration such as this:

apt::ppa{ 'ppa:ondrej/php': }

Environment

  • Version 8.4.0 through 9.2.0
  • Platform Ubuntu 20.04
kenyon added a commit to kenyon/puppetlabs-apt that referenced this issue Dec 13, 2023
This makes the ppa defined type easier to use without having to remember
to include the apt class. The original version of ppa.pp did an include
like this. See puppetlabs#1152 (comment)

Fixes puppetlabs#1151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants