Rudy Giuliani says it was no gaffe when he went public with the revelation President Donald Trump repaid Michael Cohen for a cash layout to porn star Stormy Daniels, CNN reported.

The former New York City mayor — now working as Trump's lawyer — on Wednesday told CNN the financial disclosure form Trump was required to send to the Office of Government Ethics was the reason Giuliani went public with the news during an interview with Fox News' Sean Hannity earlier this month.

"And that's why the president affirmed it, yes," Giuliani told CNN when asked if the financial disclosure process was the reason he revealed Trump repaid Cohen for the $130,000 to keep Daniels from talking about an alleged affair.

"It took a couple of weeks to figure out exactly what we had to do about it, and there was a bit of debate about it – not about disclosing but about how to disclose," Giuliani said.

Trump submitted his financial disclosure form, showing he made a payment to Cohen between $100,001 and $250,000 in 2017. That money is believed to be the reimbursement for the payment to Daniels.

Giuliani said he knew news of the payment would come out, even if he did not know "exactly when or what would come out," and he does not agree with the ethics office's contention the payments had to be disclosed, CNN reported.

"Frankly, I love the idea that the Office of Government Ethics says that everything is fully disclosed and therefore its ethical," Giuliani told CNN. "I don't fully agree with them that it had to be disclosed. We disclosed it as an abundance of caution. I think if it's an expenditure rather than a liability, you don't have to disclose expenditures, but that's lawyers quibbling."

But Giuliani said there was no debate about whether to reimburse Cohen.

"That was what I was happiest about because it got it [us] out of any serious campaign finance violation, probably out of the campaign finance law completely," he said. "The president can donate anything he wants to his campaign. He had donated something close to $100 million, what's another $100,000?"