Skip to content

añadidas condiciones para evitar nulos#92

Merged
daniel89fg merged 2 commits into
FacturaScripts:mainfrom
Pabloferrandezroca:tarea4739
Jun 19, 2026
Merged

añadidas condiciones para evitar nulos#92
daniel89fg merged 2 commits into
FacturaScripts:mainfrom
Pabloferrandezroca:tarea4739

Conversation

@Pabloferrandezroca

Copy link
Copy Markdown
Contributor

añadidas condiciones para evitar nulos en el comando mod ya que podía ocurrir que borrase el init.php

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 903bc99308

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +91 to +92
else{
return Command::FAILURE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Continue when the import already exists

When Init.php already contains the needed core import but is missing this mod registration—for example after a previous run aborted after writing the use, or after a user added the import manually—this branch returns before calling addToInitFunction(), leaving the newly created Mod/*.php file unregistered. InitEditor::addUse() returns null for duplicate imports as well as failures, so the duplicate-import case should be skipped rather than treated as fatal.

Useful? React with 👍 / 👎.

@daniel89fg daniel89fg merged commit e38c085 into FacturaScripts:main Jun 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants